Favorite Game List utilizing vectors and iterators So in learning c++ I have to make a little program that makes a game list that can add games to the list, remove games, and display the list, and it has to use vectors and iterators, so I made the program and need feedback on how to improve it and make it cleaner/better

// Favourite Game list
// Program using vectors and iterators

#include&lt;iostream&gt;
#include&lt;string&gt;
#include&lt;algorithm&gt;
#include&lt;vector&gt;
#include&lt;ctime&gt;
#include&lt;cctype&gt;
#include&lt;cstdlib&gt;


using namespace std;

int main()
{
    bool quit = false;
    string game_name;
    vector&lt;string&gt; gameList;
    vector&lt;string&gt;::iterator myIterator;
    vector&lt;string&gt;::const_iterator iter;
    int choice;
    while (!quit)
    {
        cout &lt;&lt; "1: Add a Game to List" &lt;&lt; endl;
        cout &lt;&lt; "2: Remove a Game from the List" &lt;&lt; endl;
        cout &lt;&lt; "3: List all the Games on the List" &lt;&lt; endl;
        cout &lt;&lt; "4: Exit the Program" &lt;&lt; endl;
        cin &gt;&gt; choice;

        switch (choice)
        {
        case 1:
            cout &lt;&lt; "Enter the Game Name to add" &lt;&lt; endl;
            cin &gt;&gt; game_name;
            gameList.push_back(game_name);
            break;
        case 2:
            for (iter = gameList.begin(); iter != gameList.end(); ++iter)
                cout &lt;&lt; *iter &lt;&lt; endl;
            cout &lt;&lt; "Here is the list of games enter the one to remove" &lt;&lt; endl;
            cin &gt;&gt; game_name;
            iter = find(gameList.begin(), gameList.end(), game_name);
            cout &lt;&lt; *iter &lt;&lt; "This is the game we will remove" &lt;&lt; endl;
            gameList.erase(iter);

            break;


        case 3:
            cout &lt;&lt; "Your Games" &lt;&lt; endl;
            for (iter = gameList.begin(); iter != gameList.end(); ++iter)
                cout &lt;&lt; *iter &lt;&lt; endl;
            break;

        case 4:
            quit = true;
            cout &lt;&lt; "You chose quit! The Program Will Close Now" &lt;&lt; endl;

        }

    }






    return 0;
}
Unused headers
As far as I can tell, nothing from the following headers is actively being used, so they shouldn't be included.

&lt;ctime&gt;
&lt;cctype&gt;
&lt;cstdlib&gt;

using namespace std
While it's probably not quite as bad using it inside a .cpp file instead of a header, it's generally seen as a code smell.
Variable usage
There are some variables that are declared at the begin of main, but only used further down (if at all, myIterator appears to not be used at all). This makes it harder to keep track of variables.
Magic numbers/literals
There are a lot of numbers/string literals, whose intention is not obvious in all cases. Examples include values 1 to 4 for input choices, or strings like &quot;Your Games&quot;.
One way of dealing with these so called magic numbers is to put them into adequately named enums, constants or variables.
Container choice
There doesn't seem to be any dependency on actually keeping the order of the games intact. In addition, a small oversight (it is possible to add the same game twice) leads me to suggest that maybe a different container would be a better fit: std::unordered_set.
std::unordered_set allows us to insert and remove items with amortized \$\mathcal{O}(1)\$ runtime complexity, as well as to ignore duplicates.
Iterators or ranged for loops?
Generally, I prefer ranged for loops over &quot;manual&quot; iterator loops if the code isn't requiring some specific iterator behavior. Since this isn't the case here, I would suggest using ranged for loops for ease of reading.
Prefer smaller functions
Generally, it is easier to work with smaller functions: There is less mental overhead due to shorter code, fewer variables and narrower scope. Additionally, it allows for code reuse, which might reduce code duplication.
While the given code is small enough that these concerns might not matter right now, it will become a lot more obvious once additional logic like formatting, input handling or similar gets added.
Error checking
Neither user inputs nor results of calls to std::find are being checked for invalid values. This means I can easily cause errors inside the program (or crash it) by just entering weird stuff, or trying to remove non-existing entries.
Summary
Using all these suggestions, a cleaned up version could look like this:
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;unordered_set&gt;

enum class input_choices : int {
    add = 1,
    remove,
    list,
    exit
};

std::ostream&amp; operator&lt;&lt;(std::ostream&amp; output, input_choices choice) {
    output &lt;&lt; static_cast&lt;int&gt;(choice);
    return output;
}

std::istream&amp; operator&gt;&gt;(std::istream&amp; input, input_choices&amp; choice) {
    int temp = 0;
    input &gt;&gt; temp;
    choice = static_cast&lt;input_choices&gt;(temp);
    
    return input;
}

namespace messages {
    static const auto menu_header = &quot;Menu&quot;;
    static const auto option_add = &quot;Add a game to the list&quot;;
    static const auto option_remove = &quot;Remove a game from the list&quot;;
    static const auto option_list = &quot;Show all games on the list&quot;;
    static const auto option_exit = &quot;Exit the program&quot;;
    static const auto enter_menu_choice = &quot;Your choice: &quot;;

    static const auto enter_game_to_add = &quot;Enter the Game Name to add&quot;;
    static const auto enter_game_to_remove = &quot;Here is the list of games enter the one to remove&quot;;
    static const auto list_header = &quot;Your games&quot;;
    static const auto quitting = &quot;Exiting program...&quot;;
    static const auto invalid_choice = &quot;Unknown menu option&quot;;
}

class game_list_menu {
    std::unordered_set&lt;std::string&gt; games;

public:
    void add_game() {
        const auto game = enter_game(messages::enter_game_to_add);
        games.insert(game);
    }

    void remove_game() {
        print_games();

        const auto game = enter_game(messages::enter_game_to_remove);
        games.erase(game);
    }
    
    std::string enter_game(std::string_view prompt) const {
        std::cout &lt;&lt; prompt &lt;&lt; &quot;: &quot;;
        
        auto game = std::string{};
        std::cin &gt;&gt; game;
        
        return game;
    }


    void print_games() const {
        std::cout &lt;&lt; &quot;\n&quot; &lt;&lt; messages::list_header &lt;&lt; &quot;:\n\n&quot;;
        
        for(auto&amp; game : games) {
            std::cout &lt;&lt; &quot;\t&quot; &lt;&lt; game &lt;&lt; &quot;\n&quot;;
        }
    }

    void print_menu() const {
        std::cout &lt;&lt; &quot;\n&quot; &lt;&lt; messages::menu_header &lt;&lt; &quot;\n\n&quot;;
        
        print_choice(input_choices::add, messages::option_add);
        print_choice(input_choices::remove, messages::option_remove);
        print_choice(input_choices::list, messages::option_list);
        print_choice(input_choices::exit, messages::option_exit);
        
        std::cout &lt;&lt; &quot;\n&quot; &lt;&lt; messages::enter_menu_choice;
    }

    void print_choice(input_choices choice, std::string_view description) const {
        std::cout &lt;&lt; &quot;\t&quot; &lt;&lt; choice &lt;&lt; &quot;: &quot; &lt;&lt; description &lt;&lt; &quot;\n&quot;;
    }

    void main_loop() {
        auto choice = input_choices::exit;

        do {
            print_menu();
            
            std::cin &gt;&gt; choice;

            switch(choice) {
            case input_choices::add:
                add_game();
                break;
            case input_choices::remove:
                remove_game();
                break;
            case input_choices::list:
                print_games();
                break;
            case input_choices::exit:
                std::cout &lt;&lt; messages::quitting &lt;&lt; &quot;\n&quot;;
                break;
            default:
                std::cout &lt;&lt; messages::invalid_choice &lt;&lt; &quot;\n&quot;;
                break;
            }
        } while(choice != input_choices::exit);
    }
};

int main() {
    auto menu = game_list_menu{};
    menu.main_loop();
}


Can you see how you can easily tell what each function does or what the meaning of each number/literal is?