Jun 9, 2014 at 5:51pm
I am making a saving system and for this reason, I need to read some number out of it, that's why.
I want to get out the number from each line (y, x, z)
and example, if those lines get's called a, b, c - I want to put each line back on the y, x and c, like normal saving system.
so a = y, b = x, c = z, where a is the first line, b is the second line and c is the third line.
This is my saving code:
1 2 3 4
|
ofstream myfile;
myfile.open ("savefile.txt");
myfile << y << "\n" << x << "\n" << z;
myfile.close();
|
Thanks for all suggestions.
Last edited on Jun 9, 2014 at 6:06pm
Jun 9, 2014 at 5:58pm
Where are you declaring your variables?
Jun 9, 2014 at 6:05pm
Top of the codding.
int c; // chances
int nn; // double chance
int n; // second command
int x = 5; // pokeballs
int y; //pokemons
int z; // cash
Last edited on Jun 9, 2014 at 6:07pm