fork(12) download
  1. #include <string>
  2. #include <iostream>
  3. int main()
  4. {
  5. std::string str="123";
  6. long int num = stol(str.substr(1,2));
  7. std::cout << num << '\n';
  8. }
Success #stdin #stdout 0s 2960KB
stdin
Standard input is empty
stdout
23