OBJECT by dizydiz

VIEWS: 83 PAGES: 1

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

								
To top