fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Appointment
  5. {
  6. private:
  7. string description;
  8. string date,tm;
  9.  
  10. public:
  11. virtual occurs_on(int year,int month,int day);
  12.  
  13. }
  14. class OneTime : Appointment
  15. {
  16.  
  17.  
  18. }
  19.  
  20. class Daily : Appointment
  21. {
  22.  
  23.  
  24.  
  25. }
  26.  
  27. class Weekly : Appointment
  28. {
  29.  
  30.  
  31.  
  32. }
  33. class Monthly : Appointment
  34. {
  35.  
  36.  
  37. }
  38. int main() {
  39.  
  40.  
  41.  
  42.  
  43. return 0;
  44. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:11:46: error: ISO C++ forbids declaration of ‘occurs_on’ with no type [-fpermissive]
  virtual occurs_on(int year,int month,int day);
                                              ^
prog.cpp:13:1: error: expected ‘;’ after class definition
 }
 ^
prog.cpp:18:1: error: expected ‘;’ after class definition
 }
 ^
prog.cpp:25:1: error: expected ‘;’ after class definition
 }
 ^
prog.cpp:32:1: error: expected ‘;’ after class definition
 }
 ^
prog.cpp:37:1: error: expected ‘;’ after class definition
 }
 ^
stdout
Standard output is empty