You can pass a pointer to a member, but in order to call the member
function through it, you will also need to pass a reference to an

class A
void f();

int func(A& r, void (A::*pmf)())
(r.*pmf)(); // call member function through ptr

int main()
A a;
void (A::*p)() = &A::f; //take member's address

func(&a, p);

Danny Kalev

"The ANSI/ISO C++ Professional Programmer's Handbook"

"Helder Simões" wrote:
> Hi,
> I have a problem: is it possible to pass a class member function as an argument
> to another function?
> I know it is possible with normal functions, but I couldn't figure it out
> with class members.
> Thanks.