Skip to content

Commit

Permalink
Resolved entire line of input, Closes ChicoState#2
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosF03R committed Sep 25, 2024
1 parent fc7e124 commit a0fdba0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -24,4 +27,4 @@ int main(){
}

return 0;
}
}

0 comments on commit a0fdba0

Please sign in to comment.