// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
   for(;;)
   {
       try
       {
           char *p = new char[10000000];
       }
       catch(bad_alloc ba)
       {
           cerr << "Oops" << endl;
           return 1;
       }
   }
   return 0;
}
