本文地址: http://blog.csdn.net/caroline_wendy
C语言转换形式:
... std::string str; int i = atoi(str.c_str()); ...
C++转换形式(C++11):
... std::string str; int i = std::stoi(str); ...
参考: http://en.cppreference.com/w/cpp/string/basic_string/stol
C++ - string类型转换int类型,布布扣,bubuko.com
原文地址:http://blog.csdn.net/caroline_wendy/article/details/29390573