Originally Posted by
whiteflags
test is a function prototype, so you get that error, see
this.
Yeah, still wet behind the ears with C++. But the actual error persisted, it was because of the difference between:
Code:
a.*func(1,2); // nope
(a.*func)(1,2); // okay
Now I think that's the answer, since you can call any suitable member of an instance of X through the pointer fptr.
How about getting that to work as a param to a method (2nd example post #7) which is what the OP wants? I'm starting to think it cannot be done (a method cannot accept a function pointer to another method of the same class).