1.任意类型转换为string类型 template<class T> void to_string(string&res,const T&t) { ostringstream oss; oss<<t; res=oss.str(); }