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";