#ifndef DATE_H #define DATE_H #include //for class ostream (the class of the object cout) using namespace std; //This is the header file for class date. //Jan 1, 0 AD is day 0 //Jan 2, 0 AD is day 1 //Dec 31, 0 AD is day 364 //Jan 1, 1 AD is day 365 //etc. //so day / 365 is the year //and day % 365 is the day of the year (in the range 0 to 364 inclusive) class date { int day; static const int length[12+1]; public: date(int m, int d, int y); date(); //Put today's date into the newborn object. friend ostream& operator<<(ostream& ost, const date& d); }; #endif