voidto_string(string & result,constT& t) { ostringstream oss;//创建一个流 oss<<t;//把值传递如流中 result=oss.str();//获取转换后的字符转并将其写入result } std::ostringstream os; BigInt c; os << c; std::string str = os.str();