不知道为什么了.......
#include<iostream.h>
union a
{
int a_int1;
double a_double;
int a_int2;
};
typedef struct bb
{
union a a1;
char y;
}b;
class c
{
double c_double;
b b1;
union a a2;
};
int main()
{ c c1;
cout << "int=" << sizeof(int)<<endl;
cout << "double=" << sizeof(double)<<endl;
cout << "char=" << sizeof(char)<<endl;
cout << "a=" << sizeof(union a)<<endl;
cout << "b=" << sizeof(b)<<"="<<sizeof(a)+sizeof(char)<<endl;
cout << "c=" << sizeof(c)<<"="<<sizeof(double)+sizeof(a1)+sizeof(b)<<endl;
return 0;
}