From 96f9d38230fc972c33e8a9b959cc66b6fecc98e7 Mon Sep 17 00:00:00 2001 From: Alejandro Barajas Date: Wed, 25 Sep 2024 11:12:51 -0700 Subject: [PATCH] added multiword functionality, resolves #1 --- main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index f2ddce4..ca83cbe 100644 --- a/main.cpp +++ b/main.cpp @@ -14,8 +14,11 @@ int main(){ else{ cout << "What is your next favorite?\n"; } - cin >> input; - list.push_back(input); + + getline(cin, input); + if (input != "done") { + list.push_back(input); + } }while( input != "done" ); cout << "Your favorite list:\n";