--> 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)
|