We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61bd9af commit b124956Copy full SHA for b124956
src/main.cpp
@@ -10,6 +10,11 @@ int main() {
10
do {
11
std::cout << "$ ";
12
std::getline(std::cin, input);
13
+ std::string cmd = input.substr(0, input.find(' '));
14
+ std::string args = input.substr(input.find(' ') + 1);
15
+ if (cmd == "exit") {
16
+ exit(std::stoi(args));
17
+ }
18
if (input != "") {
19
std::cout << input << ": command not found" << std::endl;
20
}
0 commit comments