15,440
社区成员
发帖
与我相关
我的任务
分享
#ifndef UTILITY_H
#define UTILITY_H
#include <string>
#include <sstream>
using std::string;
using std::stringstream;
template <typename T> const string str(const T & t) // 转换任意类型为string
{
stringstream ss;
ss << t;
string s;
ss >> s;
return s;
}
#endif