// Small test program for the postorder traversal #include "bintree2.h" void addone(int& value) { value++; } void main( ) { BinaryTreeNode* root; BinaryTreeNode* left; BinaryTreeNode* right; BinaryTreeNode* bottom; bottom = create_node(1); left = create_node(2, bottom); right = create_node(3); root = create_node(4, left, right); cout << "Original tree before adding one to each node: " << endl; print(root, 0); postorder(addone, root); // a parameter can be a function! p459 cout << "New tree after adding one to each node: " << endl; print(root, 0); }