Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Menu
- {
- int size;
- string items[5];
- public:
- Menu()
- {
- }
- void set(int n, string s[])
- {
- for (int i = 0; i < n; i++)
- {
- items[i] = s[i];
- }
- }
- void show()
- {
- for (int i = 0; i < 5; i++)
- {
- cout << i+1 << "- " << items[i] << endl;
- }
- }
- int choice();
- };
- int main()
- {
- string array [5] ={"Add", "Sub", "Mul", "Div", "Exit"};
- Menu x;
- x.set(5, array);
- x.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment