Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

CONSTANT

VIEWS: 61 PAGES: 1

									#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();
 }

								
To top