I'm new to programming, and I need a lot of help with this project. I was wondering if you guys can help me out. I know that there are so many mistakes in my code; I just need someone to lead me in the right direction. This is the project that I have to create:
Create a main menu for a game that will ask players to choose a player name and the player's last saved level (example level1).
Create the following functions and call them starting from main.
startMenu() - The functionality for starting a new game or quitting will go in this function. This should ask the user to choose via a cin ask from the console.
What exactly do you mean by mistakes? It compiles, it runs and it saves the file called 'data.txt' with one entry in it. Is the logic flawed, yes it is, so start by fixing that first so at least in main the flow will make sense.
What I'm not clear about, is there multiple "*.txt" files each with a player's name or just one file with multiple players for just one player in that file.
Get your logic working right first.
1: Ask for players name. If you enter nothing, program should bail.
2: loadData
3: startMenu
4: saveData
No, there isn't multiple "*.txt" files. It's just one file.
That is basically where my problem is at; how can I get the program to bail if I enter nothing. I don't know how to get it to quit in the startMenu() function.