I got one code with binary trees.
http://pastebin.com/f307cbe21
Is here:
pointer pointing at pointer (*node).left or node->left ???Code:void treeList(TreeNode *node) { // Print the items in the tree in postorder, one item // to a line. Since the tree is a sort tree, the output // will be in increasing order. if ( node != NULL ) { treeList((*node).left); // Print items in left subtree. cout << " " << node->item << endl; // Print item in the node. treeList(node->right); // Print items in the right subtree. } } // end treeList()
Thanks in advance.




Reply With Quote
