string to int:
string s="123";
int n=atoi(s.c_str());
int to string:(头文件 sstream)
int n=123;
stringstream ss;
string s;
ss<<n;
ss>>s;
string to int:
string s="123";
int n=atoi(s.c_str());
int to string:(头文件 sstream)
int n=123;
stringstream ss;
string s;
ss<<n;
ss>>s;