title: Overloading the ++ operator for binary trees
body: <p>In my program I have a preOrder Iterator class for my Binary Tree. In it I am trying to implement an operator overload on the ++ operator in order to traverse the tree from beginning to end. But I get confused because a Binary Tree can have both a left and a right side. How do I know where the beginning is? Is it always the left most node?</p>
  
  <p>This is my code structure:</p>
  
  <p>Parent Binary Tree:</p>
  
  <pre><code>/* Binary Tree */
  class bin_tree
  {
  public:
      int data;
      bin_tree *left;
      bin_tree *right;
      bin_tree *parent;
  
      class preOrder_iterator; //child iterator class 
  };
  </code></pre>
  
  <p>Child iterator class:</p>
  
  <pre><code>/* Iterator class -- inherits from parent */
  class bin_tree::preOrder_iterator : public bin_tree
  {
          preOrder_iterator&amp; operator ++ () //++ prefix operator overload
          {
  
          }
          preOrder_iterator begin();
          preOrder_iterator end();
  };
  </code></pre>
  
  <p>One I figure out what to use for the beginning and end, how would I implement this overload?</p>