Помогите разобраться в чем дело. Написал программу:
Код:
#include<stdio.h>
enum months
{
JAN=1,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC
};
int main()
{
enum months month;
const char *monthName[]={"","January","February","Martch","April","May","Juny","July","August","September","Octomber","November","December"};
for( month=JAN; month<=DEC; month++ )
{
printf("%2d%11s\n", month, monthName[ month ] );
}
return 0;
}
Вроде все правильно написано, но при компиляции она выдает ошибку:
Цитата:
error C2676: binary '++' : 'months' does not define this operator or a conversion to a type acceptable to the predefined operator
Что это за ошибка и как её исправить?