Date: Thu, 10 Jun 1999 18:54:50 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Peter Russell cc: djgpp AT delorie DOT com Subject: Re: fread In-Reply-To: <375FBFC0.8074E939@melbpc.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 10 Jun 1999, Peter Russell wrote: > I'd like some info on what I am doing wrong here. This block of code > works perfectly in Borland C 3.1 and in MS QC ver 6 but gives an > erroneous result in DJGPP. It reads a binary file into an array of > structures and displays to screen. Was the file written by a DJGPP program that declared the BOOK structure in the same manner? If not, then what you see is a result of padding struct members which is done differently by different compilers. See section 22.10 of the DJGPP FAQ list for more details.