http://www.cplusplus.com/reference/sstream/ostringstream/

https://en.cppreference.com/w/cpp/io/basic_stringstream

https://www.cnblogs.com/hdk1993/p/5853233.html

https://blog.csdn.net/qq1987924/article/details/7671154

template<class T>

void to_string(string & result,const T& t)

{

ostringstream oss;//创建一个流

oss<<t;//把值传递如流中

result=oss.str();//获取转换后的字符转并将其写入result
}

std::ostringstream os;
BigInt c;
os << c;
std::string str = os.str();

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2021-12-26
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
猜你喜欢
  • 2021-06-07
  • 2022-12-23
  • 2021-05-22
  • 2022-01-20
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
相关资源
相似解决方案