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;
}
posted @ 2012-01-30 16:47  Dsp Tian  阅读(671)  评论(0编辑  收藏  举报