关于C结构体对齐注意事项

在C语言中Specifies packing alignment for structure, union, and class members.

 
#pragma pack( [ show ] | [ push | pop ] [, identifier ] , n  )

pack对齐对enum无效,且sizeof(enum类型)总是4.详细请见MSDN.

posted @ 2012-01-13 16:18  yifan  阅读(170)  评论(0)    收藏  举报