I'm trying to use these 2 voids but it gets stuck when not using fclose and it gives a "handle is invalid" error when i use fclose. What could be the problem? I will probably put all the code in pastebin and put the link later. Link (the voids are at the end. They are being used in the MainMenu() void.).

I'd guess that what you experience as being stuck is just that your program prints everything to the file instead of to the screen after the you have redirected the standard output to the file instead, and likewise trying to read any input from the saved file instead of the keyboard. And I would also guess that you cannot close the standard input and output handles, which is why it says the handle is invalid.

But that aside, why are you saving and loading via the standard input and output, and not just through a temporary file handle?