this is the code for findmin and findmax and it shows an error that..
C:\Dev-Cpp\include\Bst.cpp expected constructor, destructor, or type
conversion before '*' token
C:\Dev-Cpp\include\Bst.cpp expected `;' before '*' token
C:\Dev-Cpp\include\Bst.cpp expected constructor, destructor, or type
conversion before '*' token
C:\Dev-Cpp\include\Bst.cpp expected `;' before '*' token
what must be done wid the function header?? and it should return a
BinaryNode which is a structure declared as private in the
BinarySearchTree class...
Kindly help
template <class Comparable>
BinaryNode * BinarySearchTree<Comparable>::findMin(BinaryNode *t)const
{
if(t==NULL)
return NULL;
if(t->left==NULL)
return t;
return findMin(t->left);
}
template <class Comparable>
BinaryNode * BinarySearchTree<Comparable>::findMax(BinaryNode *t)const
{
if(t==NULL)
return NULL;
if(t->right==NULL)
return t;
return findMax(t->right);
}
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.