#include <iostream.h>
class A
{
int a;
public:
A(int x)
{
a=x;
cout<<"Virtual Base A..."<<endl;
}
};
class B:virtual public A
{
public:
B(int i):A(i)
{
cout<<"Virtual Base B..."<<endl;
}
};
class C:virtual public A
{
int x;
public:
C(int i):A(i)
{
cout<<"Constructing C..."<<endl;
}
};
class ABC:public C,public B
{
public:
ABC(int i,int j,int k):C(i),B(j),A(i)
{
cout<<"Constructing ABC..."<<endl;
}
};
void main()
{
ABC obj(1,2,3);
}