-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.cpp
28 lines (27 loc) · 805 Bytes
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "case_string.hpp"
#include <iostream>
#include <string>
int main() {
for (;;) {
std::cout << "Please enter one of: new, load, save, or quit:\n";
std::string option;
std::cin >> option;
switch(hash_djb2a(option)) {
case "new"_sh:
std::cout << "You entered \'new\'\n";
break;
case "load"_sh:
std::cout << "You entered \'load\'\n";
break;
case "save"_sh:
std::cout << "You entered \'save\'\n";
break;
case "quit"_sh:
std::cout << "You entered \'quit\'\n";
return 0;
default:
std::cout << "Command not recognized!\n";
break;
}
}
}