I'm trying to create a menu for my animal guessing game. This is the simple menu I am currently using:
This is what I want it to look like:Code:do { system ("CLS"); cout << " | Twenty Questions |\n" << " ?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?\n" << " | |\n" << " | 1. Read the directions |\n" << " | 2. Play the game |\n" << " | 3. Find out how many animals I know |\n" << " | 4. Reset my database |\n" << " | 5. Exit program |\n" << " | |\n\n" << "Choose an option: \n"; cin >> option; switch (option) { case '1': directions(); break; case '2': playTheGame(animals); break; case '3': countAnimals(animals); break; case '4': reset(animals); break; case '5': if(exit(animals)) return; break; } } while (true);
As you can see, I want my program to move the '>' character up and down to select an option. Don't worry about telling me how to input directional keys, I've figured that out. All I want to know is, if there is a way, how to move that cursor up and down without using a loop that clears the screen and outputs again and again.Code:| Twenty Questions | ?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---?---? | | | > Read the directions | | Play the game | | Find out how many animals I know | | Reset my database | | Exit program | | | Use the arrow keys to select an option.
Or in simpler terms, how do I move the blinking | thing wherever I want.



LinkBack URL
About LinkBacks


