title: binary search tree assignment operator
body: <p>I am having a huge issue with my recursive function in my binary search tree. My project is due in a few hours and I cannot for the life of me get ahold of my instructor.</p>
  
  <p>My function seems to only be traversing the left most branch of my tree.</p>
  
  <p>Assignment Operator:</p>
  
  <pre><code>template&lt;typename Type&gt;
  BST&lt;Type&gt;&amp; BST&lt;Type&gt;::operator=(const BST&amp; that)
  {
      if(this != &amp;that)
      {
          this-&gt;clear();
          Node *c = that.root;
          preORet(c);
      }
      return *this;
  }
  </code></pre>
  
  <p>Recursive Function Called:</p>
  
  <pre><code>template&lt;typename Type&gt;
  void BST&lt;Type&gt;::preORet(Node *c)
  {
      this-&gt;insert(c-&gt;data);
  
      if(c-&gt;left != nullptr)
          preORet(c-&gt;left);
      else if(c-&gt;right != nullptr)
          preORet(c-&gt;right);
  }
  </code></pre>
  
  <p>As an aside, I understand that a lot of this may look like seriously bastardized code, but this is how my instructor expects it to look.</p>
  
  <p>Thank you in advance.</p>