I am using C++ virtual functions. I have a base class treeNode and two derived classed splitNode and leafNode. some pointers in the splitNodes point to other nodes which may be either splitNode or leafNode. At runtime, how can I check whether the pointer points to a leaf or split node, whithout changing the structure of the nodes (i.e., I don't want to add any new function to them).
Regards