#include enum eMonths { JANUARY = 1, FEBUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER }; //post-incrament eMonths& operator++(eMonths& Month, int Garbage) { eMonths OldMonth = Month; if (Month != DECEMBER) { Month = static_cast( Month + 1 ); } else { Month = JANUARY; } return OldMonth; } //pre-incrament eMonths& operator++(eMonths& Month) { if (Month != DECEMBER) { Month = static_cast( Month + 1 ); } else { Month = JANUARY; } return Month; } ostream& operator<<(ostream& output, const eMonths& Month) { switch(Month) { case JANUARY: output << "Jan"; break; case FEBUARY: output << "Feb"; break; case MARCH: output << "Mar"; break; case APRIL: output << "Apr"; break; case MAY: output << "May"; break; case JUNE: output << "Jun"; break; case JULY: output << "Jul"; break; case AUGUST: output << "Aug"; break; case SEPTEMBER: output << "Sep"; break; case OCTOBER: output << "Oct"; break; case NOVEMBER: output << "Nov"; break; case DECEMBER: output << "Dec"; break; } void main() { eMonths Month = JANUARY; do { cout << "Current Month number is" << Month << endl; Month++; }while(Month != JANUARY); cout << Month << endl; cout << Month++ << endl; cout << ++Month << endl; }