I am trying to make a game that implements high scores into a .txt file. The question I have is this : when I make a statement such as:
fout << score << endl << player;
std::ofstream creates a new file by default. You have to create the file with the append parameter.
ofstream fout("filename.txt", ios::app);