Here is the program which uses pointers to members, variables and functions.
Pointer to variables are done without error as i checked keeping the blocks with problem in comment line.
The problem is with member function. I did it as it was given in book and even saw same format on net.
The errors are like this:cannot call member function 'void' sejal::get without object.
The compiler is Bloodshed's Dev c++
using namespace std;
friend sejal add(sejal,sejal);
cout<<"\nEnter the value";
cout<<"\nThe value is :"<<y;
sejal add(sejal m, sejal k)
cout<<"The addition value is:";
/*using pointer to member variable*/
cout<<"\nPrinting using pointer to member"<<":"<<a.*p<<"\n"<<b.*p;
cout<<"Now taking pointer to object";
cout<<"\n"<<"Printing using pointer to object"<<i->*p<<"\n"<<h->*p;
cout<<"Using pointers to member function";
cout<<"\nNow using pointer to object\n";