标签:转换 its main mes space string c++ namespace printf
string转为int
string str = "100000"; stringstream ss; ss << str; int i; ss >> i; printf("%d", i);
int转为string
#include<bits/stdc++.h> using namespace std; int main() { int m = 1000; string str = to_string(m); cout << str; }
标签:转换 its main mes space string c++ namespace printf
原文地址:https://www.cnblogs.com/legendcong/p/9615083.html