title: map iterator not dereferencable
body: <p>I am getting compile error "map/set" iterator not dereferencable". What is going on here?</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;map&gt;
  
  using namespace std;
  
  int main(){
      map&lt;int, int&gt; m;
      map&lt;int, int&gt;::iterator itr=m.begin();
  
      itr-&gt;first = 0;
      itr-&gt;second = 0;
  
      cout &lt;&lt; itr-&gt;first &lt;&lt; " " &lt;&lt; itr-&gt;second;
      return 0;
  }
  </code></pre>