I am coding a hash tree in C++, where I need two different types of nodes i.e. one for non leaf that will simply point to its children and other for leaf node which contains the required information.
The problem I am facing is that how can I declare pointers in non leaf node. Because some non leaf nodes are to point other non leaf nodes and some have to point the leaf nodes. So I cant declare one pointer type to the pointer in non leaf node.
Any help would be appreciated.