Mail Archives: djgpp/1998/03/27/15:15:38
In article <19980326011928 DOT 13219 DOT qmail AT www06 DOT netaddress DOT usa DOT net>, Carl
Kalauokalani <ckalauokalani AT usa DOT net> 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?
<snip>
> 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
- Raw text -