//g++ 5.4.0
#include <iostream>
using namespace std;
class myclass
{
public:
int who;
myclass(int id);
~myclass();
}glob_ob1(1),glob_ob2(2);
myclass::myclass(int id)
{cout<<"\nintializing\n";
who =id;
cout<<id;
}
myclass::~myclass()
cout<<"destructor\n";
int main()
myclass local_ob1(3);
cout<< "in main()\n";
myclass local_ob2(4);
cout<<"\nafter main\n";
return 0;
g++