#include < iostream.h >
class test{
int x,y;
public:
test(){x=0; y=0;cout << "\nconstructor\n";}
test(int i,int j){
x=i;
y=j; }
~test();
void showdata()  {
  cout << "x  " << x;
  cout << "y  " << y;  }  };
test::~test()  {
cout << "\ndestructing the object\n";  }
void main()  {
test t1,t2;
t2=test(50,25);
t2.showdata();
 }
Click here to go back.

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus




Footer1