#ifndef __DATE_H #define __DATE_H #include #include using namespace std; class Date{ public: Date(){} Date(int y, int m, int d); ~Date();//{cout << "calling destructor" << endl;} int getYear()const; int getMonth()const; int getDay()const{return day;} string toString()const; bool isLeapYear()const; Date& operator ++ (){ //Prefix day = day + 1; return *this; } Date operator ++ (int d){//postfix Date old(year, month,day); day = day + 1; return old; } private: int year; int month; int day; }; bool operator == (const Date& d1, const Date& d2); bool operator != (const Date& d1, const Date& d2); ostream& operator << (ostream& out, const Date& date); #endif // DATE_H