Corrections |
|
Page 131: The correct implementation for the insert function is in the answer to Self-Test Exercise 18 (not 17). Page 482: The correct implementation for the tree_clear function is: template <class Item> void tree_clear(binary_tree_node<Item>*& root_ptr) // Library facilities used: cstdlib { binary_tree_node<Item>* child; if (root_ptr != NULL) { child = root_ptr->left( ); tree_clear( child ); child = root_ptr->right( ); tree_clear( child ); delete root_ptr; root_ptr = NULL; } } Page 798, line 2: The correct statement to insert into a map: m[k] = e;Corrections for earlier editions are available through the supplements page.