#include using namespace std; //myPtrToClassFunction3.cpp // Address of a member function //similar to myPtrToClassFunction1.cpp //excep;t this example uses typedef class Base { private: int y; public: void myMethod(int); } ; void Base:: myMethod(int x) { y= x; cout<< y; } typedef void (Base::*proxy)(int);//=&Base::myMethod; int main() { Base base1; proxy pxy = &Base::myMethod; cout<<"\n calling a public method "; base1.myMethod(20); cout<<"\n pointer to a function was initialized"; cout<<"\n with the address of a class member function "; (base1.*proxy)(20); return 0; }