if file highscore.txt does not exist
create file highscore.txt
write highscore in highscore.txt
if score > highscore
remove all text in highscore.txt
write score in highscore.txt
else//it does exist
if score > highscore
remove all text in highscore.txt
write score in highscore.txt
i am very confused with the methods and when to use ofstream and ifstream.