内存对齐啊
c语言吧
全部回复
仅看楼主
level 10
#pragma pack(8)
struct example1
{
short a;
long b;
};
struct example2
{
char c;
example1 struct1;
short e;
};
#pragma pack()
指定了对齐8字节,对于结构2来说,不管限制了吗?因为结构1有效为4,所以2也是4限制吗
2016年03月15日 08点03分 1
level 10
误槽
2016年03月15日 08点03分 2
level 10
2016年03月15日 08点03分 3
哈哈笑死
2016年03月15日 08点03分
1