将一个字符串(string类型)转换成一个int类型
int CommString::str_to_int(const std::string &str)
{
int ivalue = 0;
sscanf(str.c_str(), "%d", &ivalue);
return ivalue;
}
int CommString::str_to_int(const std::string &str)
{
int ivalue = 0;
sscanf(str.c_str(), "%d", &ivalue);
return ivalue;
}