0
I forgot how to point into a member functions☺
Number n; int *currentNumber = (n.)&NextNumber(); How it must look like?
1 Odpowiedź
+ 1
It is not a pointer to the instance member, but pointer to the class type member:
int(Number::*ptr)() = &Number::NextNumber;
to call:
Number n;
int next = (n.*ptr)();