Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: vnlad AT myna DOT com (Vimal N. Lad / Gautam N. Lad), djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Sizeof messed up Date: Mon, 8 Jun 1998 17:08:51 -0700 Message-ID: <19980609000834.AAH6349@ppp100.cartsys.com> Precedence: bulk At 04:29 6/8/1998 GMT, Vimal N. Lad / Gautam N. Lad wrote: >Hi, >I have DJGPP v2.7.2 (I think) and Allegro v3.0. I am trying to make >my own TGA reader (I know Allegro already has it, but this is for >a Windows program and I am using DJGPP & Allegro to test >and display the format). > >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 >for the TGA format and in another compiler, Turbo C++ v1.0, it >returns the correct size wich is 18 bytes. That's not a bug, that's a feature. See FAQ section 22.9. Nate Eldredge nate AT cartsys DOT com