00001 /* 00002 * rmnode.C: recursively deletes a node together with all of its offspring 00003 *............................................................................. 00004 * version 1: Nov 1994 Piet Hut 00005 *............................................................................. 00006 */ 00007 #include "node.h" 00008 00009 void rmnode(node* b) 00010 { 00011 node* d = b->get_oldest_daughter(); 00012 while (d) { 00013 node* tmp = d->get_younger_sister(); 00014 rmnode(d); 00015 d = tmp; 00016 } 00017 delete b; 00018 } 00019 00020 /* endof: rmnode.c */