int to string
方法一
int x;
char buf[10];
sprintf(buf, "%d", x);
方法二
int x;
stringstream ss; // 使用输入输出流,头文件要包含#include<sstream>
ss << x; // 读入数字给流处理
string s = ss.str(); // 转换成字符串
方法三
string A = "";
int a = 1;
A += to_string(a); // C++11新增,std::to_string