Hi!
I have this code:
I want to check if the point of the player is better than someone in the highscore list. How the hell do i do that? All that happen now is that it sais that it doesn't answer.Code:int file_write(int points) { int dd = 0; string high; ifstream in( "highscore.txt" ); string name[5]; string point[5]; while (in >> high) { if (is_even(dd)) { name[dd] = high; } else { point[dd] = high; } dd++; } cout << point; in.close(); cin.get(); cin.get(); return 0; }The players points is calles points. And also, i store the highscore like this:
Fredrik, 5
Fredrik, 3
Erik, 3
Nobody, 1
Anybody, 1
Please help me!![]()



LinkBack URL
About LinkBacks
The players points is calles points. And also, i store the highscore like this:



