#include #include #include //for set_new_handler #include "node.h" using namespace std; void my_new_handler(); //function declaration const char *progname; //uninitialized variable int main(int argc, char **argv) { progname = argv[0]; set_new_handler(my_new_handler); const node *const p = new node(10); cout << "value == " << *p << ", prev == " << p->prev << ", next == " << p->next << ".\n" << "A node occupies " << sizeof (node) << " bytes.\n" << "The hidden numbers are " //unofficial << reinterpret_cast(p)[-2] << " and " << reinterpret_cast(p)[-1] << ".\n"; delete p; return EXIT_SUCCESS; } void my_new_handler() //function definition { cerr << progname << ": out of store\n"; exit(EXIT_FAILURE); }