Skip to content

Commit

Permalink
added getline and removed done, close #2
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaeee authored Sep 25, 2024
1 parent fc7e124 commit eedf705
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ int main(){
else{
cout << "What is your next favorite?\n";
}
cin >> input;
getline (cin, input);
list.push_back(input);
}while( input != "done" );
}while( input == "done" );

cout << "Your favorite list:\n";
for(int i = 0; i < list.size(); i++){
cout << list.at(i) << endl;
}

return 0;
}
}

0 comments on commit eedf705

Please sign in to comment.