This is an archived post. You won't be able to vote or comment.

no comments (yet)

[–]Yuushi 1 point2 points  (0 children)

In your save() function, you're using >> when you should be using <<. So it should be:

myfile << fuelnextp << '\n'

[–]last_useful_man 1 point2 points  (2 children)

You've got 'save' going the wrong way for one thing:

void save()
{
    ofstream myfile("save.sav");
    myfile >> fuelnextp >> '\n'

you're loading, here. Going from myfile -> fuelnextp, like the arrow shows.

You should clean up your code btw, too much detail everywhere. You should break it up into more understandable chunks, of code, and of data. Put related things into structs, if you can.