Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Game Library
- // Exersize to create a library for favourite games
- #include <iostream>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main()
- {
- cout << "Welcome to your Game Library\n\n";
- cout << "Please choose from the following options:\n";
- cout << "1 - Add a game\n";
- cout << "2 - Remove a game\n";
- cout << "3 - List games\n";
- cout << "4 - Quit\n";
- string gameItems;
- int mainChoice;
- cin >> mainChoice;
- vector<string> gameList[30];
- switch (mainChoice)
- {
- case 1:
- cout << "\n\n\t Add a Game\n\n";
- cout << "\nEnter a game title.\n";
- cin >> gameItems;
- gameList->push_back(gameItems);
- cout << "Your Game Library now consists of: \n";
- cout << gameList;
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- default:
- cout << "Please enter 1-4";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement