Is there any way to directly get the name of an enumeration element instead of its value. For example:
enum months {Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec};
int main(){
months thisMonth = Mar;
cout << "The next month is " << thisMonth+2;
}
The output will be The next month is 4
How to get the output The next month is Apr
(directly without any extra code)??