From 6267dc60eb46caedbac7a456749d0af0c740bb21 Mon Sep 17 00:00:00 2001 From: Kevin Buffardi Date: Sat, 21 Sep 2024 15:35:44 -0700 Subject: [PATCH] Refactor 'list' as more descriptive 'favorites' --- main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index f2ddce4..9c019c1 100644 --- a/main.cpp +++ b/main.cpp @@ -5,22 +5,22 @@ using std::cout, std::cin, std::endl, std::string, std::vector; int main(){ string input = ""; - vector list; + vector favorites; do{ - if( list.size() == 0 ){ + if( favorites.size() == 0 ){ cout << "What is your favorite?\n"; } else{ cout << "What is your next favorite?\n"; } cin >> input; - list.push_back(input); + favorites.push_back(input); }while( input != "done" ); cout << "Your favorite list:\n"; - for(int i = 0; i < list.size(); i++){ - cout << list.at(i) << endl; + for(int i = 0; i < favorites.size(); i++){ + cout << favorites.at(i) << endl; } return 0;