Greetings,
My brain is inoperable and I need a fresh set of eyes to hint me in the right direction? Any help to completing the code and additional help to start a day and year functions would help?
Any help is appreciated??? I stink at enumerators!!!!Code:#include<iostream> #include<string> using namespace std; enum month {JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC}; void months(); int main() { cout << "Enter the month\n"; string M; cin >> M; cout << M; return 0; { void months() { switch (M) { case JAN: cout << "January"; case FEB: cout << "February"; case MAR: cout << "March"; case APR: cout << "April"; case MAY: cout << "May"; case JUN: cout << "June"; case JUL: cout << "July"; case AUG: cout << "August"; case SEP: return "September"; case OCT: cout << "October"; case NOV: cout << "November"; case DEC: cout << "December"; default: cerr << "\n***TRY AGAIN!***\n"; return M; } }
cj



LinkBack URL
About LinkBacks



