so should i do it this way to insert the info?
//this is for to put the info in the file
ofstream file("topelim.ini", ios::app);
String s;
s += "*arena Game over";
s += " - The Winner is: ";
.....
s += winner->name;
s += " [";
s += wins;
s += "-";
s += losses;
s += "]";
file << winner->name << wins << losses << endl;
|
If i just keep entering winner->name over and over, it will never replace the old data. Please explain a better way.
Purge - Tue Jun 14, 2005 11:40 am
Post subject:
If you need help making the bot read from a text file such as an INI, refer here.
Bak - Tue Jun 14, 2005 2:57 pm
Post subject: Re: ifstream
Read the data in from the file as you write it out to a temporary file (or a temporary data structure). Update any data you want. Copy the temp file back over the original one (or from the data structure).