diff --git a/main.cpp b/main.cpp index f2ddce4..486651c 100644 --- a/main.cpp +++ b/main.cpp @@ -14,8 +14,10 @@ int main(){ else{ cout << "What is your next favorite?\n"; } - cin >> input; - list.push_back(input); + std::getline(cin, input); + if(input != "done"){ + list.push_back(input); + } }while( input != "done" ); cout << "Your favorite list:\n";