pack
In this section:
Syntax
#pragma pack(n) #pragma pack() #pragma pack({push|pop}[,name] [,n])
Parameters
| Sets an optional structure alignment—one of |
Empty list | Restores the structure alignment to default |
| Sets a temporary structure alignment |
| Restores the structure alignment from a temporarily pushed alignment |
| An optional pushed or popped alignment label |
Description
Use this pragma directive to specify the maximum alignment of struct and union members.
The #pragma pack directive affects declarations of structures following the pragma directive to the next #pragma pack or the end of the compilation unit.
Note
This can result in significantly larger and slower code when accessing members of the structure.