C++ stringstream用于数字int转字符串string
头文件:sstream
类名: stringstream
(strstream为旧的类,应尽量避免使用)
示例:
int n;
stringstream ss;
string str;
n = 123;
ss << n; // put int n into stream ss;
ss >> str; // put ss' content to str in string format
c
原创
2015-10-09 10:15:39 ·
1144 阅读 ·
0 评论