All pastes #42990 Raw Edit

Unnamed

public text v1 · immutable
#42990 ·published 2006-02-24 08:18 UTC
rendered paste body
template <class Entry> 
int Binary_tree<Entry>::recursive_height(Binary_node<Entry> *sub_root) const
{
	if(sub_root==NULL)
		return 0;
	else
	{
		int left = recursive_height(sub_root->left);
		int right = recursive_heighteight(sub_root->right);
		if(left>=right)
			return left+1;
		else
			return right+1;
	}
}
/////error C3861: 'sub_root': identifier not found, even with argument-dependent lookup
/////error C2227: left of '->left' must point to class/struct/union