In Reply to: Re: 关于结构地址对齐的疑问? posted by Downs on January 13, 2004 at 10:44:15:
结构1为12是因为X86是32位系统,而char 型按照 32 bit, 即4 bytes对齐使用空间,所以是12。结构2中的char在2个double中间,只有按照double的类型对齐了,所以是24bytes
跟帖:
回帖
内容: