#include using namespace std; //myPtrToClassFunction1.cpp class Base { private: int y; public: void myMethod(int); } ; void Base:: myMethod(int x) { y= x; cout<< y; } void(Base::*proxy)(int)=&Base::myMethod; int main() { Base base1; 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; }