Factory Pattern: typedef Class *(createClassFunction)(void)
What does typedef Class *(createClassFunction)(void) (or another variation is typedef Class* (__stdcall *CreateClassFunction)(void) )stand for? What does it mean? How am I supposed to explain it? Especially in the context of Factory Patterns... Reading C type expressions createClassFunction is a typedef for a function taking no arguments and returning a Class * . With that declaration, a pointer to such a funciton can obviously act as factory for a Class . Usage might be as follows: // the class factory Class * MostTrivialFactoryKnownToMan() { return new Class; } // another class factory Class