From: Andy Maddison Newsgroups: comp.os.msdos.djgpp Subject: Help please - c++ file i/o Date: Mon, 24 Nov 1997 13:12:20 +0000 Organization: Coventry University Message-ID: NNTP-Posting-Host: leofric.coventry.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Lines: 26 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk If you can help me, please do cos' I'm a bit stuck! In Borland c++ the following works fine: unsigned char palette[768]; void main() { fstream palFile; palFile.open("pal.dat",ios::binary); palFile.seekg(0); palFile.read(palette,768); palFile.close(); code to manipulate palette, etc. } but, using djgpp the array(palette) is just filled with zeros. What is going on? Is there something extra that has to be done when using djgpp? I don't want to have to change to using c style i/o. Thanks, Andy