stoi: string型变量转换为int型变量
stol: string型变量转换为long型变量
stoul:string型变量转换为unsigned long型变量
stoll: string型变量转换为long long型变量(常用)
stoull:string型变量转换为unsigned long long型变量
stof: string型变量转换为float型变量
stod: string型变量转换为double型变量(常用)
stold:string型变量转换为long double型变量
————————————————
C++11标准 ,使用g++编译时需要添加-std=c++11
原文链接:https://blog.csdn.net/weixin_43899069/article/details/110290292