Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (;;)
- {
- cout << "Please select your operation!" << endl;
- cout << "1. Add" << endl;
- cout << "2. Change" << endl;
- cout << "3. Search & Sort" << endl;
- cout << "4. Give or Return a Book "<< endl;
- cout << "5. Show Data " << endl;
- unsigned int operation{};
- cin >> operation;
- while (operation < 1 || operation > 5)
- {
- cin.clear();
- cin.ignore(100000, '\n');
- cout << "Please insert the correct operation number! " << endl;
- cin >> operation;
- }
- switch (operation)
- {
- case 1:
- {
- unsigned int addOperation = 3;
- cout << "1. Add a Book" << endl;
- cout << "2. Add a Reader" << endl;
- cin >> addOperation;
- while (addOperation < 1 || addOperation > 2)
- {
- cin.clear();
- cin.ignore(100000, '\n');
- cout << "Please insert the correct operation number! " << endl;
- cin >> addOperation;
- }
- switch (addOperation)
- {
- case 1: {
- fillBook(books, shelveSize);
- break;
- }
- case 2: {
- fillReader(people, personSize);
- break;
- }
- }
- }
- break;
- case 2:
- {
- unsigned int changeOperation = 3;
- cout << "1. Change a Book" << endl;
- cout << "2. Change a Reader" << endl;
- cin >> changeOperation;
- while (changeOperation < 1 || changeOperation > 2)
- {
- cin.clear();
- cin.ignore(100000, '\n');
- cout << "Please insert the correct operation number! " << endl;
- cin >> changeOperation;
- }
- switch (changeOperation)
- case 1:
- {
- select(books,shelveSize);
- }
- break;
- case 2:
- {
- select(people,personSize);
- }
- break;
- }
- break;
- case 3:
- {
- }
- break;
- case 4:
- {
- }
- break;
- case 5:
- {
- }
- break;
- }
- }
Add Comment
Please, Sign In to add comment