Yes exactly. Well my goal of this thread was to get the information needed for ini file handling. The variable part I had a vague understanding of already. I'm playing with the piece of code now, experimenting with it. This is EXACTLY what I needed. :D TY
*makes a note to thank sohguanh in the credits section of the program.*
Usually you would need a container to store those data.
MyClass {
public:
int HP1;
..
}
map<string, MyClass> var; //key will be the Player name which I assume is unique. Then for every extracted strings, you construct and put inside above map container.
One thing I just thought of, writing the stats back to the file to save information. Shouldn't be hard just use something like:
1 2 3 4
while (!inFile.eof()) {
inFile >> player >> exp1;
outFile << player << " " << exp1+10 << endl;
}
The only thing that raises question is how to get it to write it on the correct section and line without duplicating or over writing information. I'm sure I can figure it out though.