daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Aug 18th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Press anykey to continue in Linux C  
  2. cout << "Press Enter to Continue...";
  3.     cin.ignore(numeric_limits<streamsize>::max(),'n');
  4.    
  5. //Manager's Menu
  6. void SelectionPage::showManagerMenu(){
  7.     char option;
  8.     while(true)
  9.     {
  10.         system("clear");                                                //Clears the terminal
  11.         cout<<"             Flat Manager's Menu"<<endl<<endl;           //Display manager's menu
  12.         cout << "Select Manager option" << endl;
  13.         cout << "a) Add a new Flat Member" << endl;
  14.         cout << "b) Delete an existing Flat Member" << endl;
  15.         cout << "c) List Flat Members" << endl;
  16.         cout << "d) Duties" <<endl;
  17.         cout << "e) Resources" <<endl;
  18.         cout << "f) Reset System" <<endl;
  19.         cout << "q) Exit" << endl;
  20.         cout << "make selection: ";
  21.         cin >> option;
  22.  
  23.         switch(option) {                                                //Takes the user to the corresponding menu or method
  24.             case 'a':   system("clear");
  25.                         memberList.addNewFlatMember(points);
  26.                     break;
  27.             case 'b':   system("clear");
  28.                         memberList.deleteFlatMember();
  29.                     break;
  30.             case 'c':   system("clear");
  31.                         memberList.listFlatMembers();
  32.                     break;
  33.             case 'd':   system("clear");
  34.                         showDutiesMenu();
  35.                     break;
  36.             case 'e':   system("clear");
  37.                         showResourcesMenu();
  38.                     break;
  39.             case 'f':   //reset();
  40.                     break;
  41.             case 'q':   exit(0);
  42.             default:    cout << "Option not recognised: " << option << endl;
  43.                         showManagerMenu();  
  44.         }
  45.     }
  46. }
  47.    
  48. //Show the current flat population
  49. void MemberManagement::listFlatMembers(){
  50.     cout<<"             Member List"<<endl<<endl;
  51.  
  52.     importFlatMembers();                                                //get flat member info from file
  53.  
  54.     for( int count = 0; count<flatMemberList.size(); count++){
  55.         cout << count+1<<". "<<flatMemberList[count].getName() << endl;
  56.     }
  57.  
  58.     cout << "Press any key to Continue...";
  59.     cin.ignore(numeric_limits<streamsize>::max(),'n');
  60.  
  61.     return;
  62.  
  63. }
  64.    
  65. cout << "make selection: ";
  66.    
  67. cin >> option;
  68.    
  69. cin.ignore(numeric_limits<streamsize>::max(),'n');
  70.    
  71. cout << "make selection: " << flush;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top