union a {
int a_int1;
double a_double;
int a_int2;
};
typedef struct
{
a a1;
char y;
} b;
class c
{
double c_double;
b b1;
a a2;
};
cout << sizeof(c) << endl;
结果是 32;为什么呀?
...全文
1108打赏收藏
高手请进..........
union a { int a_int1; double a_double; int a_int2; }; typedef struct { a a1; char y; } b; class c { double c_double; b b1; a a2; }; cout << sizeof(c) << endl; 结果是 32;为什么呀?