I am trying to run an example from a book I read.
"
#include <stdio.h>
enum months { Jan,Feb,Mar,Apr,Jun,Jul,Aug,Sep,Oct,Nov,Dec};
int main()
{
enum months month;
const char* monthName[]= { "","January","February","March","April","May","June","July","August","September","October","November","December"};
for (month=Jan;month<=Dec;month++)
printf("%2d%11s\n",month,monthName[month]);
return 0;
}
"
This code gives these errors:
main.cpp:35: error: no 'operator++(int)' declared for postfix '++', trying prefix operator instead
main.cpp:35: error: no match for 'operator++' in '++month'
Like you see "month++" in for loop's beginning gives the error but in the book it is written as that...

