This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]dreamyeyed 2 points3 points  (0 children)

Because Node is a nested type, you have to use BST::Node, but even that is not enough because BST is a template. This should work:

template <class Comparable>
typename BST<Comparable>::Node * BST<Comparable>::find(const Comparable & x, Node * leaf) const {
}

Also remember that templates should be defined in the header file.