From: leger_v AT bluewin DOT ch Newsgroups: comp.os.msdos.djgpp Subject: Problem fread and structures Date: Fri, 27 Mar 1998 19:32:18 +0100 Organization: Swisscom AG, the blue window Lines: 17 Message-ID: <351BF0B2.6AC2@bluewin.ch> NNTP-Posting-Host: sio22pub129.bluewin.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk See this structure : struct { unsigned x,y,z,a; char c; char array[10]; }samplestruct; FILE *stream; Why when I use fread(&samplestruct, sizeof(samplestruct), 1, stream); The structure samplestruct contains false data. And when I compile my program whith Borland C++ the program works fine ? Thanx, Patrick.