cpp学习(day-three)

#include <iostream>

using namespace std;


int main()
{
    enum rank
    {
        first,  //0
        second, //1
        third   //2
    };
    int nRank = 2;
    switch (nRank)
    {
        case first:
            cout<<"q";
            break;
        case second:
            cout<<"w";
            break;
        case third:
            cout<<"e";
            break;
        default:
            break;
    }
    return 0;
}

  

猜你喜欢

转载自www.cnblogs.com/Blue-Moniter4/p/9467956.html