string s = "123"; //字符串转数字 int n = stoi(s); cout<<n<<endl; //数字转字符串 string str = to_string(n); cout<<str<<endl;