枚举类型
#include<iostream>using namespace std;
int main()
{
enum workday{mon,tue,thr,thu,fri,sat,sun};
workday i;
for(i=mon;i<=sun;i++) //为什么i++ 编译不能通过。
{
if(i<sat)
cout<<"workday\n";
else
cout<<"retire\n";
}
return 0;
}
2011-03-05 10:28
2011-03-05 13:37
2011-03-05 17:10

2011-03-06 14:49
2011-03-06 14:54