string to long c++
//stol(string , nullptr, base);
string str = "100";
long int num = stol(str, nullptr, 10);
cout << num << std;//output 100
//Base goes over ten with letters:
string str = "F";
long int num = stol(str, nullptr, 16);
cout << num << std;//output 15