Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <sstream>
- using namespace std;
- void djreader();
- void menu();
- /*
- MAIN FUNCTION BLOCK
- */
- int main()
- {
- cout << "DJ Burn 1's List Handler \n" << endl;
- cout << "Current DJ List: \n" << endl;
- cout << "************************************\n" << endl;
- djreader();
- cout << "\n************************************\n" << endl;
- menu();
- }
- /*
- DJ LIST READER BLOCK
- */
- void djreader()
- {
- string DJList;
- ifstream myfile ("DJList.txt");
- if (myfile.is_open())
- {
- while ( myfile.good() )
- {
- getline (myfile,DJList);
- cout << DJList << endl;
- }
- myfile.close();
- }
- else cout << "Unable to open file";
- }
- /*
- MENU FUNCTION BLOCK
- */
- void menu()
- {
- int menu_select;
- int passer;
- cout << "Welcome to DJ Burn 1's Line Handler. \n" << endl;
- cout << "1. Move Line" << endl;
- cout << "2. Add a DJ to line" << endl;
- cout << "3. Remove a DJ from line" << endl;
- cout << "4. Quit Application \n" << endl;
- cout << "Selection: ";
- cin >> menu_select;
- passer = menu_select;
- cout << "\n" << endl;
- // SWITCH CASE FOR MENU
- switch (passer)
- {
- case 1:
- cout << "Choice 1" << endl;
- break;
- case 2:
- // TODO (Add a DJ to the line)
- case 3:
- // TODO (Remove a DJ from the line)
- default:
- cout << "Shit, something broke, wtf did you do? =) \n" << endl;
- }
- }
Add Comment
Please, Sign In to add comment