A Program to Call member function using objects of that class:-


#include<iostream.h>
#include<conio.h>

class comment
{
public:

void show()
{
cout<<"I am C++ Learner";
}
};

void main()
{
clrscr();
comment yes;
yes.show();
getch();
}

Output:


I am C++ Learner

			

Previous Next