How to convert int to string with C++ - forest的日志 - 网易博客
C++98 solution
void int2string(int i, string& str) {
stringstream ss;
ss<<i;
str = ss.str();
}
C++11 solution
void int2string(int i, string& str) {
str = to_string(i);
}
Boost solution
void int2string(int i, string& str) {
str = boost::lexical_cast<string>(i);
}