代码报错: error:expected ';' before 'return'
ret_code probe_ssh2_t::open(const std::string& ip, unsigned short port,
const std::string& username, const std::string& password)
{
int ret_connect;
ret_connect = ssh2_.connect(ip, port, username, password);
if(ret_connect == 0)
return HORUS_E_NONE;
else if(ret_connect > 0)
return HORUS_E_SYSTEM_INTERNAL;
else(ret_connect < 0 && ret_connect >-100)
return HORUS_E_SSH;
}
我怎么都看不出错误,请帮助
[解决办法]
else if(ret_connect < 0 && ret_connect >-100)
[解决办法]
else(ret_connect < 0 && ret_connect >-100)
[解决办法]
本帖最后由 ccrun 于 2013-01-09 14:37:50 编辑
if (ret_connect == 0)
return HORUS_E_NONE;
else if (ret_connect > 0)
return HORUS_E_SYSTEM_INTERNAL;
else if (ret_connect < 0 && ret_connect > -100)
return HORUS_E_SSH;
else
return XXX;