www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000167

When Created: 07/23/1997 02:34:12
Against DJGPP version: 2.01
By whom: mdvorsky@dodo.sk
Abstract: Problem with numbers in binary files
I successfully open file with fopen in binary mode. Then I read some binary data with fread to variable (of type struct) where I have more variables (some of type unsigned char and unsigned short int). And vaules in unsigned short int isn't right. In BC++ 3 it works good. 

Note added: 07/29/1997 09:22:43
By whom: broeker@physik.rwth-aachen.de
Even from the vague description given, it's rather clear this isn't
a bug in DJGPP. It's very probably the usual structure element alignment
problem. I'll mail the bug submitter about it right now...

Closed on 04/12/1999 11:00:41: Not a bug: programmer's error in reading binary data into a struct.
By whom: eliz@is.elta.co.il



  webmaster     delorie software   privacy  
  Copyright © 2010   by DJ Delorie     Updated Jul 2010