方法:使用stringstream对象
1:首先要包含头文件#include <sstream>
2: stringstream sret ;
int ret = 0;
sret<<ret;
cout << sret.str().c_str()<< endl;