#include <iostream>
#include <string>
using namespace std;
typedef enum
{
Factory_UNKNOW = -1,
Factory_A=0,
Factory_B,
Factory_C,
Factory_D,
Factory_E,
Factory_F,
Factory_G,
Factory_H,
Factory_MAX
}
TCameraFactory;
string GetFactoryName(TCameraFactory Factory)
{
switch(Factory)
{
case Factory_A : return "A";
case Factory_B : return "B";
case Factory_C: return "C";
case Factory_D : return "D";
//
case Factory_E : return "E";
case Factory_F : return "F";
case Factory_G : return "G";
case Factory_H : return "H";
default:
break;
}
return "";
}
int _tmain(int argc, _TCHAR* argv[])
{
for(int i = 0 ; i < 10 ; ++i)
{
string ID = GetFactoryName(TCameraFactory(i));//TCameraFactory(i)生成 TCameraFactory实例
if(ID != "")
{
cout<<ID<<endl;
}
}
getchar();;
return 0;
}