Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef DATE_H
- #define DATE_H
- class Date
- {
- friend ostream& operator<<(ostream&, const Date&);
- friend istream& operator>>(istream&, Date&);
- private:
- int month; //1-12
- int day; //1-31 depending on month
- int year; //any year
- //utility function to check if day is proper for month and year
- int checkDay(int) const;
- public:
- Date(int = 1, int = 1, int = 1990);
- Date& setDate(int, int, int);
- int getMonth() const;
- Date& setMonth(int);
- int getDay() const;
- Date& setDay(int);
- int getYear() const;
- Date& setYear(int);
- // void operator= (const Date &a);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement