标签:
int转string
1 #include <string> 2 #include <sstream> 3 int n = 0; 4 stringstream ss; 5 string str; 6 ss<<n; 7 ss>>str;
string转int
1 #include <string> 2 std::string str = "123"; 3 int n = atoi(str.c_str());
标签:
原文地址:http://www.cnblogs.com/co0oder/p/5352326.html