#include <sstream>
#include <string>
void Int2Str(int nNumber, std::string &strNumber)
{
stringstream stream;
stream << nNumber;
strNumber = stream.str();
}
void Str2Int(const std::string &strNumber, int &nNumber)
{
stringstream stream(strNumber);
stream >> nNumber;
}
本文转自fengyuzaitu 51CTO博客,原文链接:http://blog.51cto.com/fengyuzaitu/2047650,如需转载请自行联系原作者