We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bb6eab commit 70b2d87Copy full SHA for 70b2d87
example/example.cpp
@@ -49,14 +49,17 @@ int main(int argc, char** argv)
49
auto calc = calc_init->makeCalculator(printer_init->makePrinter());
50
while (true) {
51
std::string eqn;
52
- std::cout << "Enter the equation: ";
+ std::cout << "Enter the equation, or \"exit\" to quit: ";
53
std::getline(std::cin, eqn);
54
+ if (eqn == "exit") break;
55
calc->solveEquation(eqn);
56
}
57
calc.reset();
58
calc_init.reset();
59
mp::WaitProcess(calc_pid);
60
printer_init.reset();
61
mp::WaitProcess(printer_pid);
62
+ loop_thread.join();
63
+ std::cout << "Bye!" << std::endl;
64
return 0;
65
0 commit comments