We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 147a710 commit 8d88f11Copy full SHA for 8d88f11
1 file changed
src/main.cpp
@@ -50,7 +50,7 @@ void runMenu() {
50
std::cout << "Enter choice: ";
51
52
int gChoice = readChoice();
53
- if (gChoice == 0) {
+ if (gChoice == gIndex) {
54
std::cout << "\n--- Exit ---\n";
55
break;
56
}
@@ -77,11 +77,11 @@ void runMenu() {
77
78
79
int eChoice = readChoice();
80
- if (eChoice == 0) {
+ if (eChoice == eIndex) {
81
continue;
82
83
84
- if (eChoice < 1 || eChoice > names.size()) {
+ if (eChoice < 1 || eChoice > eIndex) {
85
std::cout << "Invalid example choice\n";
86
87
0 commit comments