0

I forgot how to point into a member functions☺

Number n; int *currentNumber = (n.)&NextNumber(); How it must look like?

17th Sep 2018, 4:52 PM
Oleg Storm
Oleg Storm - avatar
1 Antwort
+ 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)();
17th Sep 2018, 7:03 PM
Sergey Ushakov
Sergey Ushakov - avatar