C++学习2 - 枚举型常量

来源:互联网 发布:win7定时开关机软件 编辑:程序博客网 时间:2024/06/05 03:36

#include<iostream>
using namespace std;

int main(){
 enum day{sun,mon,tue,wed,thu,fri,sat};
 day today;
 today = sat;
 if (today == sun || today == sat){
  cout << "zhoumu";
 }else{
  cout << "gongzuo";
 }
 system("pause");
 return 0;
}

更多详情请点击  http://blog.sina.com.cn/zhaojianjunzjj


 

原创粉丝点击