Home >> Sem 2 >> C++ programs >> CONSTANT
#include<iostream.h>
#include<conio.h>
class test
{
int a,b;
public :
void get(int p,int q)
{
a = p;
b = q;
}
void show() const
{
cout<<"P : "<<a<<" Q : "<<b<<endl;
}
};
void main()
{
clrscr();
test t;
t.get(11,22);
const test t2=t;
t.show();
t2.show();
getch();
}