From: Ian Miller Newsgroups: comp.os.msdos.djgpp Subject: Re: Trouble with a binary ofstream Date: 28 Aug 1997 12:51:49 +0100 Organization: Defence Research Agency Message-ID: <87zpq2zfsa.fsf@hasn.dra.hmg.gb> References: <33FEF5B4 DOT BFC007BE AT pacificnet DOT net> NNTP-Posting-Host: 146.80.115.106 Lines: 20 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk James Coram writes: > > I am having trouble using a binary ofstream with DJGPP. I get different > results depending on how I compile my program... > > /*test.cc*/ > ... > > int main() { > ofstream os("out", ios::binary); > ... I have not tried it but I suggest you try ios::out|ios::binary for the open mode argument. Just an idea. I'm not guaranteeing it will work. -- Ian Miller, Dorset, UK DJGPP 2.01, Win95 DOS box (LFN undefined, FNCASE=y)