so i have a simple trivia game as my final project in my c++ class. as it is, i would get an A+ already, but i want to be able to have top 5 high scores. I know how to read from a .dat file, and write, and i know what is supposed to happen for what i want, I just cant manage to type it out properly.
so far, I have it printing the player's name and score, along with a grade. after that, I want it to print the top 5 scores(kept in a file) then check if the player's score is higher than any of them. then add in their score to the correct placement(between next highest, and lowest). after which, it will rewrite back to the file, so next time another player will have the same options.
could someone please help my with my coder's block?