title: What does iterator->second mean?
body: <p>In C++, what is the type of a <code>std::map&lt;&gt;::iterator</code>?</p>
  
  <p>We know that an object <code>it</code> of type <code>std::map&lt;A,B&gt;::iterator</code> has an overloaded <code>operator -&gt;</code> which returns a <code>std::pair&lt;A,B&gt;*</code>, and that the <code>std::pair&lt;&gt;</code> has a <code>first</code> and <code>second</code> member.</p>
  
  <p>But, what do these two members correspond to, and why do we have to access the value stored in the map as <code>it-&gt;second</code>?</p>