title: std::map, pointer to map key value, is this possible?
body: <pre><code>std::map&lt;std::string, std::string&gt; myMap;
  
  std::map&lt;std::string, std::string&gt;::iterator i = m_myMap.find(some_key_string);
  if(i == m_imagesMap.end())
      return NULL;
  
  string *p = &amp;i-&gt;first;
  </code></pre>
  
  <p>Is the last line valid? 
  I want to store this pointer p somewhere else, will it be valid for the whole program life? 
  But what will happen if I add some more elements to this map (with other unique keys) or remove some other keys, won’t it reallocate this string (key-value pair), so the p will become invalid? </p>