#include<iostream.h>
class Base1
{
public:
Base1(int x){cout<<"Base1's con."<<x<<endl;}
~Base1(){cout<<"Base1's des."<<endl;}
};
class Base2
{
public:
Base2(int x){cout<<"Base2's con."<<x<<endl;}
~Base2(){cout<<"Base2's des."<<endl;}
};
class Derived:public Base2,Base1
{
public:
Derived(int x,int y):Base1(y),Base2(x){cout<<"Derived's con."<<endl;}
~Derived(){cout<<"Derived's des."<<endl;}
};
void exit1()
{
getchar();
}
int main()
{
Derived obj(1,2);
getchar();
atexit(exit1);
}