Hmph, I keep getting this error whenever I attempt to have a return type of BTNode*. Class BTNode is declared in my header file. I've been working on several binary tree functions but when I write a function that requires a BTNode* return type, I always get this error.
The error line is at BTNode* Tree::contains( BTNode* node, int k ) line in the code below. That function is invoked by: return remove( contains(root, k) );
I need that contains() function to return a BTNode* since that is passed to the remove function as a argument, thus the remove function knows the location of the node to delete. It also doubles as a bool for contains().
Any ideas?
The error line is at BTNode* Tree::contains( BTNode* node, int k ) line in the code below. That function is invoked by: return remove( contains(root, k) );
I need that contains() function to return a BTNode* since that is passed to the remove function as a argument, thus the remove function knows the location of the node to delete. It also doubles as a bool for contains().
Any ideas?
