From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Binary streams... Date: Fri, 27 Mar 1998 19:37:35 +0000 Organization: wot? me? Lines: 19 Message-ID: References: <19980326011928 DOT 13219 DOT qmail AT www06 DOT netaddress DOT usa DOT net> NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <19980326011928 DOT 13219 DOT qmail AT www06 DOT netaddress DOT usa DOT net>, Carl Kalauokalani writes >I'm having a bit of trouble using binary streams via djgpp. >The code below (which I borrowed from the Borland support >site) serves to demonstrate the problem; with the MS or >Borland compilers, the two files are created as expected >(text.txt: 49 bytes, bin.txt: 47 bytes), but with DJ the >bin.txt file is empty. Am I missing something? > ofileb.open( "bin.txt", ios::binary ) ; ofileb.open( "bin.txt", ios::binary | ios::out ) ; gcc needs you to explicitly set the in or out mode if you don't rely on the default parameter. I'm not sure if this counts as a bug or not, it is damn annoying ;) --- Paul Shirley: my email address is 'obvious'ly anti-spammed