fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string a = "hello";
  7. int i = stoi(a);
  8. cout << i;
  9. return 0;
  10. }
Runtime error #stdin #stdout #stderr 0s 4204KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi