Example #1
0
void BinaryTree::inOrderDisplay(TreeNode* node){
	if(NULL == node) return;
	else {
		inOrderDisplay(node->left);
		node->display();
		inOrderDisplay(node->right);
	}
}
Example #2
0
//---------------------------------------------------------------------------
// inOrderDisplay
// Displays BST inorder with a single space between values.
void BinTree::inOrderDisplay(Node* current) const
{
    if (current != NULL) // traverse and print data
    {
        inOrderDisplay(current->left);
        cout << *current->data << " ";
        inOrderDisplay(current->right);
    }
}
Example #3
0
void BinaryTree::inOrderDisplay(){
	inOrderDisplay(root);
}