Problem inheriting BST into black-red tree
<p>Since black red tree is a binary search tree I have decided to use inheritance for implementation. Here is how in short node inheritance looks in my code:</p>

<pre><code>struct BST_node
{
   // public interface here

   int key;
   BST_node* left;
   BST_node* right;
   BST_node* parent;
};

struct BRT_node : BST_node
{
   // public interface here

   NodeColour colour;
};
</code></pre>

<p>Problem I have encountered with this is pointers in derived class are type of the base class. Therefore I cannot use them in context of derived class without explicit casting. Maybe hiding members and using virtual accesor methods could do the trick, but that would destroy this simple syntax:</p>

<p>node->left = node->parent;</p>

<p>Is there a better way of doing this?</p>
