Docstoc

OBJECT

Document Sample
OBJECT Powered By Docstoc
					#include<iostream.h>
#include<conio.h>
class test
{
     int a,b;
     public:
        test()
         {
          a=b=5;
         }
    void get(test &t)
     {
       t.a = t.a + t.b;
     }
    void show()
     {
       cout<<a<<endl;
     }
};
void main()
  {
  clrscr();
    test t,t1;
    t.get(t1);
    t1.show();
    t.show();
    getch();
}

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