Browse - programming tips - tightly packed structDate: 2008dec3 Platform: win32 Language: C/C++ Keywords: pack, packing, zero Q. How can I make sure there is no padding in my C struct (on Win32) ? A. Use these includes: #include <pshpack1.h> typedef struct { BYTE a[3]; BYTE b[4]; BYTE c[5]; } MY_STRUCT; #include <poppack.h>
Add a commentSign in to add a comment | Advertisements:
|