title: How to write an iterator for a binary search tree in c++ using nodes
body: <p>I am trying to write an iterator for a binary search tree that consists of nodes that are maps </p>
  
  <pre><code>Node&lt;Key, Value&gt;* node; 
  </code></pre>
  
  <p>I have to iterate over a set of these and I don't really know how to return an iterator. </p>
  
  <pre><code>bool operator!=(const iterator&amp; rhs) const{ ....idk...}
  </code></pre>
  
  <p><code>iterator&amp; operator++(){</code></p>
  
  <p>The second one is confusing because I'm not sure how to return a iterator&amp;</p>
  
  <p>Thanks in advance </p>