c++ 枚举 在函数中的应用

#include <iostream>

using namespace std;

enum RespErrNo {
    SUCCESS = 0,
    INVALID_URL = 1,
    INVALID_SRC_ID = 2
};

RespErrNo fun(){

    return INVALID_URL;
}

int main()
{
    int a = fun();
   RespErrNo b = fun(); cout
<< a << endl; return 0; }

 

posted on 2015-05-07 22:34  雨渐渐  阅读(624)  评论(0编辑  收藏  举报

导航