Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.22 KB | None | 0 0
  1. #include <iostream> //Includes iostream for io stuff like cin and cout
  2. #include <fstream>  //Includes fstream for file manipulation
  3. #include <iomanip>  //Includes iomanip for io beatification
  4. #include <string>   //Includes strings for strings
  5. #include <windows.h>//Includes Windows.h for system functions
  6.  
  7. using namespace std;
  8.  
  9. struct date
  10. {
  11.     int day;
  12.     string month;
  13.     int year;
  14. };
  15.  
  16. struct time
  17. {
  18.     int hour;
  19.     int minute;
  20.     int second;
  21.     bool am;
  22. };
  23.  
  24. struct Event
  25. {
  26.     date DATE;
  27.     time TIME;
  28.     string name;
  29.     string note;
  30.     bool active;
  31. };
  32.  
  33. void showOptions()
  34. {
  35.     cout << "1: NEW EVENT." << endl;
  36.     cout << "2: DELETE EVENT" << endl;
  37.     cout << "3: DISPLAY SCHEDULE" << endl;
  38.     cout << "4: EXIT" << endl;
  39. }
  40.  
  41. void AddEvent()
  42. {
  43.  
  44. }
  45.  
  46. void DeleteEvent()
  47. {
  48.  
  49. }
  50.  
  51. void DisplaySchedule()
  52. {
  53.  
  54. }
  55.  
  56. void Exit(){
  57.  
  58. }
  59.  
  60. void Handler(int x)
  61. {
  62.     if(x == 1){
  63.         AddEvent();
  64.     }
  65.     else if(x == 2){
  66.         DeleteEvent();
  67.     }
  68.     else if(x == 3){
  69.         DisplaySchedule();
  70.     }
  71.     else if(x == 4){
  72.         Exit();
  73.     }
  74.     else{
  75.         cout << "You input a value that did not work." << endl;
  76.     }
  77. }
  78.  
  79. int main(){
  80.     int choice;
  81.     int numEvents = 0;
  82.     showOptions();
  83.     cout <<"What is your choice....";
  84.     cin >> choice;
  85.     Handler(choice);
  86.     return 0;
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement