// bad_alloc standard exception #include #include using namespace std; int main () { try { int* myarray ; while( 1 ) myarray = new int[1000000]; } catch (exception& e) { cout << "Standard exception: " << e.what() << endl; } return 0; }