Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <sstream>
  5. using namespace std;
  6.  
  7. void djreader();
  8. void menu();
  9.  
  10. /*
  11. MAIN FUNCTION BLOCK
  12. */
  13. int main()
  14. {
  15. cout << "DJ Burn 1's List Handler \n" << endl;
  16. cout << "Current DJ List: \n" << endl;
  17. cout << "************************************\n" << endl;
  18. djreader();
  19. cout << "\n************************************\n" << endl;
  20. menu();
  21. }
  22.  
  23. /*
  24. DJ LIST READER BLOCK
  25. */
  26. void djreader()
  27. {
  28. string DJList;
  29. ifstream myfile ("DJList.txt");
  30.  
  31. if (myfile.is_open())
  32. {
  33. while ( myfile.good() )
  34. {
  35. getline (myfile,DJList);
  36. cout << DJList << endl;
  37. }
  38. myfile.close();
  39. }
  40. else cout << "Unable to open file";
  41. }
  42.  
  43.  
  44. /*
  45. MENU FUNCTION BLOCK
  46. */
  47. void menu()
  48. {
  49. int menu_select;
  50. int passer;
  51. cout << "Welcome to DJ Burn 1's Line Handler. \n" << endl;
  52. cout << "1. Move Line" << endl;
  53. cout << "2. Add a DJ to line" << endl;
  54. cout << "3. Remove a DJ from line" << endl;
  55. cout << "4. Quit Application \n" << endl;
  56. cout << "Selection: ";
  57. cin >> menu_select;
  58. passer = menu_select;
  59. cout << "\n" << endl;
  60. // SWITCH CASE FOR MENU
  61. switch (passer)
  62. {
  63. case 1:
  64. cout << "Choice 1" << endl;
  65. break;
  66. case 2:
  67. // TODO (Add a DJ to the line)
  68. case 3:
  69. // TODO (Remove a DJ from the line)
  70. default:
  71. cout << "Shit, something broke, wtf did you do? =) \n" << endl;
  72. }
  73.  
  74.  
  75. }
Add Comment
Please, Sign In to add comment