#include<iostream.h>

#include<conio.h>

Class ex

{

int id;

public:

ex(int i)

{

id=i;

cout<<“constructor=”<<id<<“runs”;

}

~ex()

{

cout<<“object=”<<id<<“detroyed”;
}

};

void main()

{

clrscr ();

ex c1(1);

ex c2(2);

cout<<“end of main”;

getch();

}

Advertisements