fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void outOfMem()
  5. {
  6. std::cerr << "no more memory\n";
  7. std::abort();
  8. }
  9.  
  10. int main() {
  11. // your code goes here
  12. std::set_new_handler(outOfMem);
  13. return 0;
  14. }
Success #stdin #stdout 0s 4536KB
stdin
Standard input is empty
stdout
Standard output is empty