Public paste
header
By: j00s | Date: Sep 20 2007 02:24 | Format: C++ | Expires: never | Size: 455 B | Hits: 1146

  1. // header
  2.  
  3.  
  4. #ifndef DATE_H
  5. #define DATE_H
  6.  
  7.  
  8. #include <iostream>
  9. using std::ostream;
  10.  
  11.  
  12. class Date
  13.  
  14. {
  15.  
  16. friend ostream &operator<<( ostream &, const Date &);
  17.  
  18. public:
  19.  
  20. Date ( int m = 1, int d = 1, int y = 1900);
  21. void setDate( int, int, int );
  22. Date &operator++();
  23. Date operator++( int );
  24. const Date &operator+=( int );
  25.  
  26.  
  27. private:
  28.  
  29. int month;
  30. int day;
  31. int year;
  32.  
  33. static const int days[];
  34. void helpIncrement();
  35.  
  36. };
  37.  
  38. #endif
  39.