#pragma pack(1)

If I declare #pragma pack(1) inside my structure definition, looks like it
effects all other structure definitions declared after that. Is it supposed
to work that way? My understanding is that #pragma should end at the end of
structure definition where it resides.

I am using 6.2.0 PE with IDE running on XP.

Johannes <Jsukamtoh@infolink.co.id> wrote:

If I declare #pragma pack(1) inside my structure definition, looks like it
effects all other structure definitions declared after that. Is it supposed
to work that way? My understanding is that #pragma should end at the end of
structure definition where it resides.

#include <_pack1.h>

… structure with 1-byte alignment …

#include <_packpop.h>