pointer to class member function

should I use "&" to point to the function address?If & is omitted, there is compiling error, but I learnt from book no & is needed here. Does it depend on the compiler or there is universe rule for pointer pointing to class member function?

1
2
  int (practice::*funcp)() const=0;
	funcp=&practice::getvar;
Last edited on
For non-static member functions you need to use & to get a pointer to the function.
Topic archived. No new replies allowed.