C++-整数値と文字列の相互変換

312 ワード

転載先:https://blog.csdn.net/liangzhao_jay/article/details/87872493
C++11はto_を提供するstring、stoxxxメソッドの例コードは以下の通りです.
#include 
#include 
 
using namespace std;
 
//      
void numberTostr()
{
    string strInt = std::to_string(100);
    cout<