fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6.  
  7. std::string heh = "I1J";
  8.  
  9. try {
  10. cout << "ble " << std::stol(heh.c_str()) << endl;
  11. } catch (std::invalid_argument &e) {
  12. cout << "puc";
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
ble puc