#include <iostream>标签:类型转换,10,cout,int,two,C++,用法,枚举,name From: https://blog.51cto.com/u_15990596/6101648
#include <string>
using namespace std;
int main()
{
enum name{one,two=23,three};
//强制类型转换
int a=one;
cout<<a<<endl;
//不能这样直接赋值
//one=10;
//枚举变量赋值
name test=two;
cout<<test<<endl;
//强制类型转换
name myname=name(10);
cout<<myname<<endl;
return 0;
}