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;
}

  

posted on 2018-08-13 14:37  fortwater  阅读(93)  评论(0)    收藏  举报

导航