Fix input

This commit is contained in:
Love 2024-09-04 22:10:10 +02:00
parent f1c06e512d
commit 23aa73d55a

View File

@ -25,13 +25,14 @@ void printWelcome() {
}
std::string input(const char *message) {
if (message != nullptr) {
std::cout << message << FORMAT_UNDERSCORE;
if (message != nullptr)
std::cout << message;
std::cout << FORMAT_UNDERSCORE;
std::flush(std::cout);
}
std::string ret;
std::getline(std::cin, ret);
if (message != nullptr)
std::cout << END_FORMATTING;
return ret;
}