c++ - Class inheritance or nested class, which is better? -
I have a problem, those classes I have, that no longer works, because I have a specialty in public, but If I inherited it in private, or preserved and second class, then it will not work, how can I do it? template & lt; Typename T & gt; Class BinaryNode {public: T key; Binernode & lt; T & gt; * Left; Binernode & lt; T & gt; * Right; Binernode & lt; T & gt; * Guardian; Binarynode () {} ~ Binarineode () {}}; And this: template & lt; Typename T & gt; Class BinarySearchTree {Private: Binernode & lt; T & gt; * Route; Binernode & lt; T & gt; * NewNode (T key); BinaryNode & lt; T & gt; * Minimum (binary node & lt; T & gt; * node); Binernode & lt; T & gt; * Maximum (binary node & lt; T & gt; * node); BinaryNode & lt; T & gt; * Successor (Binarineod * node); Enter zero (binary node & lt; T & gt; ** node, t key); BinaryNode & lt; T & gt; * Search (Binernode & lt; T ...