int转string

#include <iostream>
#include <string>

using namespace std;

int main()
{
string a,b;
a="Dsp";
b="Tian";

char temp[5];
string ab;
for(int i=0;i<13;i++)
{
sprintf(temp,"%d",i);
ab=temp;
cout<<a+ab+b<<endl;

}
system("pause");
return 0;
}
原文地址:https://www.cnblogs.com/tiandsp/p/2332177.html