class A
{
char k[3];
public:
virtual void aa(){};
};
class B:public virtual A
{
char k[3];
public:
virtual void bb(){};
};
class C :public virtual B
{
char k[3];
public:
virtual void cc(){};
};
class D:public virtual A
{
//char k[3];
public:
// void dd(){};
};
void test()
{
cout<<"sizeof(A)="<<sizeof(A)<<endl;
cout<<"sizeof(B)="<<sizeof(B)<<endl;
cout<<"sizeof(C)="<<sizeof(C)<<endl;
cout<<"sizeof(D)="<<sizeof(D)<<endl;
}