C++における数字と文字列タイプの変換
1328 ワード
// : VS2013,C++11
#include "stdafx.h"
#include
#include
#include
int _tmain(int argc, _TCHAR* argv[])
{
string s = "1245";
string a = to_string(12345);//
//stoi(s,p,base) s , p , base 10 2 ,
int b = stoi(s);//
string c = "1011100";
int d = stoi(c,0,2);//
cin.get();
return 0;
}