to_string(val):将算数类型转换为string类型;
stoi(s,p,b):将string类型转换为int类型;
stol(s.p,b):将string类型转换为long类型;
stoul(s,p,b):将string类型转换为unsigned long类型;
stoll(s,p,b):将string类型转换为long long类型;
stoul(s,p,b):将string;类型转换为unsigned long long类型;
stof(s,p):将string类型转换为float类型;
stod(s,p):将string类型转换为double类型;
stold(s,p):将string类型转换为long double类型。
注意:b表示转换所用的基数,默认值为10;
p是size_t指针,用来保存s中第一个非数值字符的下标,p默认为0,即,函数不保存下标。