Fix input
This commit is contained in:
parent
9e4790a0a0
commit
4c11df3160
13
src/life.cpp
13
src/life.cpp
@ -25,14 +25,15 @@ void printWelcome() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string input(const char *message) {
|
std::string input(const char *message) {
|
||||||
if (message != nullptr) {
|
if (message != nullptr)
|
||||||
std::cout << message << FORMAT_UNDERSCORE;
|
std::cout << message;
|
||||||
std::flush(std::cout);
|
|
||||||
}
|
std::cout << FORMAT_UNDERSCORE;
|
||||||
|
std::flush(std::cout);
|
||||||
|
|
||||||
std::string ret;
|
std::string ret;
|
||||||
std::getline(std::cin, ret);
|
std::getline(std::cin, ret);
|
||||||
if (message != nullptr)
|
std::cout << END_FORMATTING;
|
||||||
std::cout << END_FORMATTING;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user