A
Akari
Guest
subj.
#pragma pack(1)
Thanks, it helps.Had this problem with sizeof() giving incorrect size of structures.
Code: [Select]..fixed it.Code:#pragma pack(1)
This is needed for writing binary files to disk. Save screenshot for example =)Isn't it faster to align 32-bit though?
Sorry to go kinda off-topic, but what does IIRC mean if I may ask?IIRC, the default compiler setting aligns to 32-bit. It gives better performance, IIRC. Anyway, you can get a set of commands to use by using gcc --help in a command prompt.
// store current packing mode#pragma pack( push )// set new packing mode#pragma pack( 1 ).... define structures// restore previous packing mode#pragma pack( pop )