#pragma once #include #include namespace iflytop { class Errno { public: const int code; const char* const errormsg; static const Errno OK; static const Errno ERR_USER_NAME_EXIST; static const Errno ERR_USER_PASSWD_ERROR; static const Errno ERR_USER_SPACE_FULL; Errno(int code, const char* errormsg) : code(code), errormsg(errormsg) {} bool isEq(const Errno& e) const { return code == e.code; } }; } // namespace iflytop