For some reason I have to call class method from another method of the same class via function pointer. This is and example code which illustrates my question:
class testClass
{
....
private:
void method(int parameter) {
.....
};
void callingMethod();
};
typedef void (testClass::*classMethod)(int parameter);
void testClass::callingMethod() {
classMethod method = &testClass::method;
method(1);
}
I get compilation error
error C2064: term does not evaluate to a function taking 1 arguments.
What is a right method to do such calls?