Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit 614f0c1

Browse files
Form for quitting
1 parent 77c1447 commit 614f0c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Runtime.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <cstdlib>
1515
#include <exception>
1616
#include <iomanip>
17+
#include <ios>
1718
#include <iostream>
1819
#include <ostream>
1920
#include <queue>
@@ -167,7 +168,7 @@ void Runtime::process_args(std::vector<std::string> args) {
167168
if (args[0] == "quit") {
168169
std::string answer;
169170
std::cout << "Do you wish to save any changes you have made? [y/N]" << std::endl;
170-
std::cin >> answer;
171+
std::cin >> std::noskipws >> answer;
171172
if (answer == "y") {
172173
std::cout << "Saving..." << std::endl;
173174
this->save_all();

0 commit comments

Comments
 (0)