TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: PHIL OHL
date: 1998-03-08 20:59:00
subject: Writing to a file

Hey I read your msg. and applied some of your code snipits to some
simple little programs some worked some didn't.  However I think I got
the jist of what you said but I want to make sure I understand.
-> ofstream savefile("hiscore.lst");
-> savefile << player_name << ',' << player_score;
ok 'ofstream savefile("hiscore.list");' creates some sortof pointer
titled 'savefile' which points to a file titled "hiscore.list"  ok,
first question is the file "hiscore.lst" created as soon as this
pointer is initialize?  if not then when?
the next line 'savefile << player_name << ',' << player_score;' calls
the pointer and writes the variables 'player_name' & 'player_score' to
the file "hiscore.lst" separated of course by a comma.
I'm not real sure why this is important to me but I just wanted to
know.
Thanx for your help,
Phil
--- ViaMAIL!/WC4 v1.30 
---------------
* Origin: A Mind Forever Voyaging * (806)794-3778 * Lubbock,TX (1:3804/180)

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™.