Docstoc

CONSTANT

Document Sample
CONSTANT Powered By Docstoc
					#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();
 }

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:61
posted:3/21/2010
language:English
pages:1