Hello Darin,
07 Feb 98, Darin McBride of 1:250/102 wrote to Roger Scudder
[ some text snipped ]
RS>> TM> cout >> "Hi Cyber Con";
RS>> TM> ofstream("file1.fil") << name;
RS>> You have to open the file before you can write to it.
TM> No. The ofstream constructor does that.
RS> Oh, really? I don't doubt it can be done, but is that the
RS> default or does that have to be implemented by you?
DM> Default.
One little point however, opening a file stream like this writes to a file in
textmode by default. One has to set ios::binary to write to a binary file. Or
has this changed since my ancient TC++ 3.0 for Dos? ;-))
Greetings from sunny Amsterdam,
Jan
email:bijster@worldonline.nl
http://home.worldonline.nl/~bijster
--- MBM v3.41e
---------------
* Origin: Snuffelaar bij DosBoss West (2:500/121.5122)
|