AIM: Write a C++ program to illustrate pointer to class.
A pointer to a C++ class is done exactly the same way as a pointer to a structure and to access members of a pointer to a class you use the member access operator -> operator, just as you do with pointers to structures. Also as with all pointers, you must initialize the pointer before using it.
using namespace std;
cout<<“Calling through object:\n”;
cout<<“Calling through pointer:\n”;
Calling through object:
Calling through pointer: