关于枚举,举个简单例子
#include
enum
{
sun = 2,
mon,
tue,
wed = 10,
thu,
fri,
sat,
};
void main(void)
{
printf("%d\n",mon);
printf("%d\n",wed);
printf("%d\n",thu);
}
程序输出结果为3,10,11。
我要赚赏金
