大小:sizeof运算符是你的朋友(你的C-book也是如此)。 Offset:使用offsetof()宏。 - Emmanuel C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html C -library: http://www.dinkumware.com/refxc.html 显然你的代码不符合原始规格。 你用湿面条被判30鞭。 - alc ++中的Jerry CoffinSize : The sizeof operator is your friend (so is your C-book).Offset : Use the offsetof() macro.--EmmanuelThe C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.htmlThe C-library: http://www.dinkumware.com/refxc.html"Clearly your code does not meet the original spec.""You are sentenced to 30 lashes with a wet noodle."-- Jerry Coffin in a.l.c.c++ 这篇关于结构和对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-23 15:17