#pragma pack( [ n] )Specifies packing alignment for structure and union members. Whereas the packing alignment of structures and unions is set for an entire translation unit by the /Zp option, the packing alignment is set at the data-declaration level by the pack pragma. The pragma takes effect at the first structure or union declaration after the pragma is seen; the pragma has no effect on definitions.When you use #pragma pack(n), where n is 1, 2, 4, 8, or 16, each structure member after the first is stored on the smaller member type or n-byte boundaries. If you use #pragma pack without an argument, structure members are packed to the value specified by /Zp. The default /Zp packing size is /Zp8.为了加快structure的访问速度,通常编译器会调整结构中成员的位置,使每个成员的offset地址都是2的n次方,在特殊情况下如在网络中,需要pass this structure to another program in another computer, it does not know how to change member position of the structure,so you have to pass unchanged structure to it. to prevent compiler change member offset position of the structure, use #pragma pack(1)