#include <boost/lexical_cast.hpp>
int a = lexical_cast<int>("123");
string strA = lexical_cast<string>(a);
当然也可以转换 其它的类型. 例如 long double 等
#include <boost/lexical_cast.hpp>
int a = lexical_cast<int>("123");
string strA = lexical_cast<string>(a);
当然也可以转换 其它的类型. 例如 long double 等