c语言之不再害怕sizeof(struct)(二)
(void*)&t.st1.b - (unsigned int)(void*)&t;
int x4 = (unsigned int)(void*)&t.d - (unsigned int)(void*)&t;
printf("a=0x%p,b=0x%p,c=0x%p,d=0x%p", x1, x2, x3, x4);
cin.get();
}
可以自行调试一下,看看内存中他的内存排列。