标签:string_to_in
int CommString::str_to_int(const std::string &str)
{
int ivalue = 0;
sscanf(str.c_str(), "%d", &ivalue);
return ivalue;
}
本文出自 “简单可依赖” 博客,转载请与作者联系!
将一个字符串(string类型)转换成一个int类型
原文地址:http://wenxuehui.blog.51cto.com/12898974/1954478