Skip to content

Commit

Permalink
added multi word support and removes unexpected behavior, resolves is…
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdevine01 committed Sep 25, 2024
1 parent 3a89c48 commit dd74b57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit dd74b57

Please sign in to comment.