delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/06/21:05:17

From: ams AT ludd DOT luth DOT se (Martin Str|mberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ios::binary ignored by GCC - HELP!
Date: 7 Nov 1998 01:49:05 GMT
Organization: University of Lulea, Sweden
Lines: 16
Message-ID: <7208uh$epn$1@news.luth.se>
References: <fycflpbqrpbz DOT f2134e0 DOT pminews AT nntp DOT generation DOT net>
NNTP-Posting-Host: queeg.ludd.luth.se
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

sl (sl AT psycode DOT com DOT REMOVE_THIS) wrote:
: 	When I open files in ios::binary mode, it is ignored by GCC. For
: example, writting "7" to a file opened with the binary flag should write the
: 7th ASCII character. Instead, the file contains the text-character "7".. How

You think so.

: does one go about fixing this?

Try "fprintf(f, "%c", 7);" or the equivalent in C++ (I don't know
C++).


Cocteau Twins, Milk and Kisses,

							MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019