HELP ASAP PLEASE

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 a text file named "data.txt"

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.

1. Continue

2. Start a new game

3. Quit

menuInputValidation()- In order to validate the menu selection, (1, 2, or 3), this function will check input with a boolean return if validation failed. Make the user choose again if this failed the check. This function is called from startMenu.

saveData()- This function will save the player's username (should only be one word) and the player's level achieved. Use 1 for the player's level just a test. We don't actually have a game :(

loadData()- This function will load data from a text file that has been saved only if a previous session’s data was saved to the file. To track this, the player's default name must be "BLANK" (all uppercase). You can than use an if statement to see if the player's name matches that string "BLANK". If it does, you know the player shouldn't be allowed to input the continue option and must start a new game. Display that error message and set the option to new game. If data loads successfully from the last session, display it out to the screen.

Remember:

Close the fstream file when done
Do not allow the player to continue unless the name is something other than "BLANK"
Prototype functions.
Don't use global variables
What do you need help with? Please, be specific.
Topic archived. No new replies allowed.