fork(2) download
  1. #include <vector>
  2. #include <string>
  3. #include <iostream>
  4. #include <iomanip>
  5.  
  6. using namespace std;
  7.  
  8.  
  9. int main(int argc, const char * argv[])
  10. {
  11.  
  12.  
  13.  
  14. std::string s="922337203685477580712324567878";
  15. size_t index;
  16. long long l=std::stoll(s, &index);
  17. if(index!=s.size())
  18. cout << "Error\n";
  19. }
  20.  
Runtime error #stdin #stdout #stderr 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::out_of_range'
  what():  stoll