I am trying to do some testing with a pointer to a member function. What is wrong with this code? Statement bigCat.*pcat(); not compiled.
class cat { public: void walk() { printf("cat is walking \n"); } }; int main(){ cat bigCat; void (cat::*pcat)(); pcat = &cat::walk; bigCat.*pcat(); }
c ++ function-pointers
Nayana Adassuriya Aug 30 '12 at 2:25 2012-08-30 02:25
source share