#include #include #include //for class string and the function stoi using namespace std; int main() { const string s {"l234"}; //accidentally typed lowercase L const int i {stoi(s)}; //"string to integer"; there's also "string to double" stod cout << "i = " << i << "\n"; return EXIT_SUCCESS; }