C、汇编;DOS、vxworks、Linux;数学;户外;
分类: C/C++
2013-07-03 15:15:30
#include
#include
#include
using namespace std;
//数值转换成字符串
template
std::string ValueToSting(const T inData)
{
ostringstream os;
std::string str_temp;
os.str("");
os<
os.str("");
return str_temp;
}
//字符串转换成数值
template
void StingToValue(const std::string str_temp, T &outData)
{
istringstream is(str_temp);
is>>outData;
}