string转int:
#include<cstdlib>
string str;
str = "123";
int num;
num = atoi(str.c_str())
string转double:
#include<cstdlib>
string str = "123";
double num = atof(str.c_str());
以后遇到类型转化继续补充!
string转int:
#include<cstdlib>
string str;
str = "123";
int num;
num = atoi(str.c_str())
string转double:
#include<cstdlib>
string str = "123";
double num = atof(str.c_str());
以后遇到类型转化继续补充!