Is there a way I could store a class function in a variable and have a particular class instance call the function (in effect, the variable would simply tell the class which of "its own" functions to call):
Thanks in advance.Code:class SomeClass; typedef int (SomeClass::*SOMECLASSFUNC)(); class SomeClass { public: int Initialize(); }; ... SomeClass *classInstance; SOMECLASSFUNC scf; classInstance = new SomeClass; scf = &SomeClass::Initialize(); classInstance->scf(); // looking for a piece of code that's equivalent to this in theory // compiler, of course, returns an error because there's no // such SomeClass::scf() function.