标签:
string转int
string str = "123"; int n = atoi(str.c_str()); cout << n << endl;
int转string
#include <sstream>
// int 转 string stringstream ss; int n = 123; string str; ss << n; ss >> str;
标签:
原文地址:http://www.cnblogs.com/yuguangyuan/p/5938004.html