#include <stdio.h>
struct test1{
char a1;
int a2;
double a3;
};
struct test2{
char a1;
struct test1 t;
};
int main(void)
{
printf("%d
",sizeof(struct test1));
printf("%d
",sizeof(struct test2));
return 0;
}
用gcc编译 为16 20
用VC编译 为16 24