TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CAMERON CLARK
from: CLIFF RHODES
date: 1997-08-25 22:47:00
subject: stream bug???

--> Cameron Clark wrote to All  <--
CC>    The following pseudo-code has an unfortunate side effect:
CC>    (using Borland c++ 4.51)
CC> 
CC>    ofstream outf("out.bin");
// You want binary mode
ofstream outf("out.bin", ios::binary);
CC>    The side effect is that it writes the following:
CC> 
CC>    12345#13#10           (where #13 & #10 are ascii characters)
Text mode can have these sorts of 'translations' depending on the 
system. For instance, DOS expands any '\n' to '\n' '\r'. Use binary 
mode to make sure what you output is what you want.
Cliff Rhodes
cliff.rhodes@juge.com
crhodes@flash.net
X CMPQwk 1.42 1692 X"Maturity is the ability to postpone gratification." - 
Sigmund Freud
--- Maximus/2 3.01
---------------
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.