【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
相關文章
相關標籤/搜索