// PL10/badalloc.cpp // illustrates an exception thrown by new (allocating memory) // Niels Walet. Last edited 03/12/2019 #include #include int main() { double *my_array; try { my_array = new double[10000000000000000]; } catch(std::bad_alloc memFail) { std::cerr<<"Memory allocation failure"<