title: C++ Map with value that is a pointer
body: <p>If I have a map of type<code>std::map&lt;std::string, Person&gt;</code> where <code>Person</code> is a class I have defined, the following is how I would access the <code>Person</code> at the iterator <code>it</code>:</p>
  
  <pre><code>it-&gt;second;
  </code></pre>
  
  <p>But what if the map was of type<code>std::map&lt;std::string, Person*&gt;</code>, in which case the element would be a pointer to a <code>Person</code>, rather than an actual <code>Person</code>. How would I then access the <code>Person</code>? For example, is this correct:</p>
  
  <pre><code>*it-&gt;second;
  </code></pre>
  
  <p>or is this:</p>
  
  <pre><code>it-&gt;*second;
  </code></pre>
  
  <p>Thanks!</p>