Hi,
I know they're not used often and there are usually better options, but I thought I'd learn about them for the sake of completeness. I have a question about them.
I always thought that the name of a function is a pointer to that function, much like the name of an array is a pointer to the first element of the array. Is this not the case for member functions? For example, something like this won't compile
But this willCode:int (MyClass::*pFunc)() const = 0; pFunc = MyClass::getMemberVariable;
Answers much appreciatedCode:int (MyClass::*pFunc)() const = 0; pFunc = &MyClass::getMemberVariable; //need the "address of" operator here to make it work
Thanks for your time
Stonehambey