#include<iostream.h>
#include<conio.h>
int count=0;
class alpha
{
public:
alpha()
{
count++;
cout<<"Call of constructer ="<<count<<endl;
}
~alpha()
{
cout<<"Call of distructer="<<count<<endl;
count--;
}
};
void main()
{
clrscr();
{
alpha a1,a2,a3 ;
{
cout<<"Enter into the block";
alpha a4 ;
cout<<"Exit from the block";
}
}
getch();
}
No comments:
Post a Comment