Skip to main content
GameDev.net gamedev.net
🔒 Locked

Byte Alignment in Structs (solved)

Started by Prozak Jan 31, 2004 at 2:28 AM 1 replies 200+ views
Original Post
Prozak
Prozak
Hi, Im mapping a BMP header onto a strut, and it seems to be aligning each of the components of the struct to 4 bytes. How can i disable byte alignment for that struct only? Thanks for any tips... Jester Says: Visit Positronic Dreams!
[Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD]
[Yann L.][Enginuity] [Penny Arcade] [MSDN][VS RoadMap][Humus][BSPs][UGP][NeHe]
The most irrefutable evidence that there is intelligent life in the Universe is that they haven't contacted us!
[edited by - pentium3id on January 31, 2004 3:35:08 AM]
evolutional
evolutional
Before the struct

#pragma pack(1)

struct
{

..........


};

#pragma pack()

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.