【C++】int转换为string的两种方法(to_string、字符串流)

记录一下用到过的int转换成string的两种方法ios 第一种是to_string函数,这是C++11新增的,使用很是方便,简单查了下:C++11标准增长了全局函数std::to_string,以及std::stoi/stol/stoll等等函数(这几个就是string转int,long,以及long long啦~)函数 to_string这个函数仍是很强大的!spa string to_str
相关文章
相关标签/搜索