可能重複:
Alternative to itoa() for converting integer to string C++?
How to convert a number to string and vice versa in C++
Append an int to a std::string如何整數轉換爲字符串
我想整數轉換爲字符串,任何一個可以幫助我的這些轉換?
itoa(*data->userid,buff1,10);
itoa(*data->userphone,buff2,10);
對於下面發佈答案的所有人,不要再給另一個重複和追逐SO分數,您最好投票將其作爲副本關閉。 – mloskot
三種可能性:http://stackoverflow.com/questions/10516196/append-an-int-to-a-stdstring/10516313#10516313 – hmjd