From 74bb908680066ee27ca26c266e11c727c63a38e7 Mon Sep 17 00:00:00 2001 From: robert00000 Date: Wed, 18 Feb 2026 11:35:54 -0800 Subject: [PATCH] Fixed issue #96 by having checkers for if the user inputs 'nothing' into the program. --- main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d9884f9..ad40e00 100644 --- a/main.cpp +++ b/main.cpp @@ -23,14 +23,20 @@ int main(){ getline(cin,input); transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); }); cout << VALIDATION[pick] << "! Let's listen to more\n"; + if(input == "nothing"){ + return 0; + } do{ cout << "What's next?\n"; 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" ); return 0; -} \ No newline at end of file +}