I have a templated class:<br><br>template <class ANYTYPE><br>TREE {<br>public:<br>...<br>private:<br> struct Node {<br> ANYTYPE data;<br> Node * Right; // Pointer to Right Child Node<br> Node * Left; // Pointer to Left Child Node<br> };<br>...<br>};<br><br>The tree is basically a set of pointers, either pointing to a node in the tree or null. It is a binary tree, so each node has at most two children.<br><br>One member function, TreeMax, returns the largest valued node in the tree. Now since this is a templated class, this function returns the ANYTYPE data type. This is not a problem when the tree actually contains nodes. However, when the tree is empty (i.e. just one pointer pointing to null) I run into trouble. I can return null for any data type, but if the program user decides to do something like this:<br><br><br>TREE<char *> Animals; // Tree is empty<br>cout << Animals.TreeMax();<br><br>Here I run into trouble, because TreeMax is null, and I can't print null to the screen (I get an error). So, my question is, is there any variable I can substitue for null that can be printed for any data type? In other words, what should I make TreeMax return in the case that the tree is empty (one pointer pointing to null)? <br><br>Thanks.<br><br>Zaid<br>