Mail Archives: djgpp/1998/06/08/13:00:26
Vimal N. Lad / Gautam N. Lad wrote in message <357c0fc1 DOT 0 AT news DOT myna DOT com>...
>For some odd reason, the sizeof function returns the wrong size.
>I have a structure, which is exactly 18 bytes long. When I call
>sizeof(TGAHEAD); (I am trying to read the header of a .TGA file),
>it says the header is 20 bytes long. I have the correct structure
Sounds like djgpp is padding your structure to a 4-byte boundary. IIRC,
there's a section in the FAQ that addresses this.
Later,
Matt.
- Raw text -