title: Class inheritance issue
body: <p>I am trying to implement an AVL tree. Initially I implemented two classes, node and node_AVL as such:</p>
  
  <pre><code>class node{
  protected:
      int info;
      node *l, *r;
  public:
      node *getRight();
  };
  
  class node_AVL : public node{
  protected:
      int height;
  public:
      void setHeight(int):
  };
  </code></pre>
  
  <p>The problem arises when for example I try to access the child of a node:</p>
  
  <pre><code>node_AVL *node1 = node2.getRight();
  
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>node_AVL node;
  node.getRight().setHeight(1);
  </code></pre>
  
  <p>I get these errors:</p>
  
  <p>Invalid conversion from node* to node_AVL*</p>
  
  <p>Class node has no member setHeight()</p>
  
  <p>How can I solve this?</p>