diff --git a/main.cpp b/main.cpp index 690cf17..9309d88 100644 --- a/main.cpp +++ b/main.cpp @@ -23,12 +23,22 @@ int main(){ srand(time(0)); pick = rand() % VALIDATION.size(); cout << "What are you listening to?\n"; - input = get_input_in_lowercase(); + getline(cin,input); + if(input == "nothing") + { + return 0; + } + transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); }); cout << VALIDATION[pick] << "! Let's listen to more\n"; - do{ + do{ cout << "What's next?\n"; - input = get_input_in_lowercase(); + getline(cin,input); + if(input == "nothing") + { + return 0; + } + transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); }); pick = rand() % VALIDATION.size(); cout << VALIDATION[pick] << "!\n"; }while( input != "nothing" );