我在书上看到有把枚举变量当做循环控制变量的,但我在用的时候总是报错,是在vc++6.0中不支持这样做吗,我从网上找的程序也无法正常运行,报错为:E:\CYUYAN\练习\枚举_1.cpp(27) : error C2676: binary '++' : 'enum main::season' does not define this operator or a conversion to a type acceptable to the predefined operator
#include<stdio.h>
void main()
{
enum season {spring=1,summer,autumn,winter}s;
for(s=spring; s<=winter; s++)
printf("%d\n",s);
}