#include #include // When destroyed, this class brings about the end of the world if no // lamb is sacrificed. struct Apocalypse { int depth; Apocalypse(int depth) : depth(depth) { } void sacrifice(char *lamb) { depth = 0; } ~Apocalypse() { if (depth) Apocalypse now(depth-1), please(depth-1); } }; int main(int argc, char **argv) { try { Apocalypse a(1000); a.sacrifice(new char[1000L*1000*1000*(argc > 1 ? atoi(argv[1]) : 100)]); } catch (std::bad_alloc) { throw; } }