#ifndef SMALLDATEH #define SMALLDATEH #include "date.h" class smalldate: public date { static const int pre[]; int day; //number of days before or after January 1, 0 A.D. void print(ostream& ost) const; public: smalldate(int initial_month, int initial_day, int initial_year) : date(initial_month, initial_day, initial_year), day(365 * initial_year + pre[initial_month] + initial_day - 1) {} smalldate& operator++() {++day; return *this;} smalldate& operator+=(int count) {day += count; return *this;} }; #endif