This topic is now archived and is closed to further replies.


fixing packing of structs to be written to files

Recommended Posts

What is the correct packing to build a struct to write it to a file, (a TGA header right now). its unopenable right now, and I''m almost positive its the packing. #pragma pack(push, 1) ... #pragma pack(pop) doesn''t work, am I doing it wrong? it doesn''t appear wrong according to MSDN, its the 1 i''m not sure about. i searched for TGA readers/writers, they all just write each part one by one. I don''t really mind doing it that way, i''d just like to know why my packing code doesn''t work. thanks for the help

Share this post

Link to post
Share on other sites