第一种: #include <iostream> using namespace std; int main() { int i = 456; char a[10]; string str; itoa(i, a, 10); str = a; cout<<a<<endl; return 0; } 第二种: #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; }