数字转字符串
int a=111;
stirng s;
s=to_string(a);
字符串转数字
//转为int
string s="111";
int a;
a=atoi(s.c_str());
//转为long
string s="111";
int a;
a=atol(s.c_str());
//转为long long
string s="111";
int a;
a=atoll(s.c_str());
数字转字符串
int a=111;
stirng s;
s=to_string(a);
字符串转数字
//转为int
string s="111";
int a;
a=atoi(s.c_str());
//转为long
string s="111";
int a;
a=atol(s.c_str());
//转为long long
string s="111";
int a;
a=atoll(s.c_str());