diff --git a/main.cpp b/main.cpp index f2ddce4..03386ee 100644 --- a/main.cpp +++ b/main.cpp @@ -14,12 +14,12 @@ int main(){ else{ cout << "What is your next favorite?\n"; } - cin >> input; + getline(cin, input); list.push_back(input); }while( input != "done" ); cout << "Your favorite list:\n"; - for(int i = 0; i < list.size(); i++){ + for(int i = 0; i < list.size() - 1; i++){ cout << list.at(i) << endl; }