//通过字符串进行switch选择
#include<iostream>
using namespace std;
int main()
{
#include<iostream>
using namespace std;
int main()
{
enum MyEnum//枚举类型
{
one,two,three,
};
MyEnum str;
str = two;
switch (str)
{
case one:
cout << "this is one" << endl;
break;
case two:
cout << "this is two" << endl;
break;
case three:
cout << "this is three" << endl;
break;
default:
break;
}}
return 0;