C++中stoll和stod函数
string 类型转为long long stoll()
stoll可以兼容stoi(转为int),stol(转为long)
stoll(字符串,起始位置,n进制),将 n 进制的字符串转化为十进制
string 类型转为double stod() stod可以兼容stof(转为float)
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s = "FFFF";
int t = stoll(s,0, 16);
cout << t << endl;
string s1 = "123";
double a = stod(s1);
cout << a;
return 0;
}