Programming Practice
Deitel and Deital, 4th edition, Chapter 23

23.25 Use inheritance to create a base exception class and various derived exception classes. Then show that a catch handler specifying the base class can catch derived-class exceptions.

23.26 Write a program designed to generate and handle a memory exhaustion error. Your program should loop on a request to create dynamic storage through operator new.