Exemple #1
0
void BinaryTree<T>::_InOrder(Node *root){
	if(root==NULL){
		return ;
	}
	_InOrder(root->_left);
	std::cout<<root->_value<<" ";
	_InOrder(root->_right);
}
	void _InOrder(Node *root)
	{
		if (NULL != root)
		{
			_InOrder(root->pLeft);
			std::cout << root->_key << " ";
			_InOrder(root->pRight);
		}
	}
	void _InOrder(BinaryTreeNode_Thd<T>* root)
	{
		if (root == NULL)
			return;

		_InOrder(root->_left);
		cout<<root->_data<<" ";
		_InOrder(root->_right);
	}
Exemple #4
0
void BinaryTree<T>::InOrder(){
	_InOrder(_root);
	std::cout<<std::endl;
}
	void InOrder()
	{
		_InOrder(pRoot);
		std::cout << std::endl;
	}
	void InOrder()
	{
		cout<<"InOrder:";
		_InOrder(_root);
		cout<<endl;
	}