您的位置:首页 > 编程语言 > C语言/C++

c++ 数字转为string

2014-09-25 13:28 302 查看
#include
<iostream>#include

<string>using

namespace
std;
int
main() {
int
n
=
65535;

char
t[256];

string
s; sprintf(t,
"%d",
n); s
=
t; cout
<<
s
<<
endl;
return
0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: