Howdy,
OK, I am doing this to write to a .dat file:
ofstream file;
int noob=50;
file.open("thingy.dat");
file << "NOOB: " << endl;
file << noob << endl;
Then I open the .dat file with NOTEPAD and edit the "noob" variable to 100. How do I then read/extract the "noob" variable? I tried this but it doesn't work:
ifstream file;
int noob;
file.open("thingy.dat");
file >> noob;
That code doesn't read the "noob" variable. Which brings me to my main question. How do I read the "noob" variable if it comes after a string "NOOB: "?
[Edited by - Acid rain on April 7, 2007 6:50:55 PM]
------------------------------Trust me, I do this all the time.