bad_alloc.cc
changeset 8 96d16dfe787a
parent 2 97beb75e5ac7
child 9 c3fecc82ade6
equal deleted inserted replaced
7:a1aa30f0f904 8:96d16dfe787a
    30 
    30 
    31     try {
    31     try {
    32         for (;;) {
    32         for (;;) {
    33             v.push_back (i++);
    33             v.push_back (i++);
    34         }
    34         }
    35     }
    35     } catch (exception & e) {
    36     catch (exception & e) {
       
    37         cout << e.what () << " after " << i << " iterations" << endl << endl;
    36         cout << e.what () << " after " << i << " iterations" << endl << endl;
    38         cout << "Would you like to see the full error message? (y/n) ";
    37         cout << "Would you like to see the full error message? (y/n) ";
    39         cin >> action;
    38         cin >> action;
    40 		v.resize(0);
    39 		v.resize(0);
    41         switch (action) {
    40         switch (action) {