枚举类型变量如何进行运算?
typedef enum{left,right,bottom,top} boundry;
for (winedge=left;winedge<=top;boundry(winedge++))
{
}
编译时显示:
error C2676: binary '++' : 'boundry' does not define this operator or a conversion to a type acceptable to the predefined operator
说没有定义 “++”运算符,难道非要自己再重新定义吗,又没有简单的方法可以实现这个功能? 谢了。