From: Andy Maddison Newsgroups: comp.os.msdos.djgpp Subject: Please Help! - file i/o Date: Wed, 26 Nov 1997 16:26:34 +0000 Organization: Coventry University Lines: 26 Message-ID: NNTP-Posting-Host: leofric.coventry.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Can anyone help me? Program Fragment: unsigned char palette[768]; fstream inFile; inFile.open("pal.dat",ios::binary); inFile.seekg(0); //not essential inFile.read(palette,768); inFile.close(); This works fine using Borland C++, but under DJGPP the array (palette) is always filled with zeros (NULLs?). What is happening? Why doesn't it work? I like using C++ and I don't want to have to switch to C style file i/o. Please help if you can cos' I'm stuck :( Thanks Andy