Last active
February 17, 2025 06:14
-
-
Save stephenquan/3f0496294627e907eca5e520e9030d7b to your computer and use it in GitHub Desktop.
cpp_opt_prompt.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool done = true; | |
do | |
{ | |
char Opt[255]; | |
cout << "\nOption: "; | |
cin >> Opt; | |
done = true; | |
switch (Opt[0]) | |
{ | |
case '0': | |
//... | |
break; | |
case '1': | |
//... | |
break; | |
case '2': | |
//... | |
break; | |
case '3': | |
//... | |
break; | |
case '4': | |
//... | |
break; | |
default: | |
done = false; | |
break; | |
} | |
} while (!done); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment