摘要: http://dev.firnow.com/course/3_program/c++/cppjs/2008331/107799.html结构体(struct)的sizeof值,并不是简单的将其中各元素所占字节相加,而是要考虑到存储空间的字节对齐问题。先看下面定义的两个结构体.struct{ char a; short b; char c;}S1;struct{char a;char b;short... 阅读全文
posted @ 2010-05-24 22:52 bettermanlu 阅读(813) 评论(0) 推荐(0) 编辑