1) Best way to add a menu in my program's format. Loops or Switch statements? How to proceed?
2) Why doesn't #include <cwindows> work?
3) Using the for loop to clear the screen seems more roundabout than system ("CLS") but decided to forgo system codes. Is there an easier solution than using for loops?
4) If using for loop to clear the screen how to make cursor on the top?
1) Best way to add a menu in my program's format. Loops or Switch statements? How to proceed?
umm... your choice. Although I would prefer a switch inside do-while loop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
{
cout<<"GAME MENU:";
//random game choice 1
//random game choice 2
//.. and so on..
switch(choice)
{
//switch statements
}
while(choice!=0)//0 for exit from menu
)
}
3) Using the for loop to clear the screen seems more roundabout than system ("CLS") but decided to forgo system codes. Is there an easier solution than using for loops?
well system ("CLS") is not universal but the for loop is not the ideal solution. Stick system ("CLS")
Thanks for all of your help. I'll practice switches before implementing that into my program. Since everybody experienced says using system <anything> is bad I'll try to avoid it, even though it makes the code look cleaner. I've already read up on SetConsoleCursorPosition; I'll try that when I feel I'm ready. I tried stuff like -endl but nothing simple worked. Thanks again.