title: How to remove an entry from a std::map using key?
body: <p>I am having a following a map,</p>
  
  <pre><code>struct details;
  
  map&lt;std::string, details&gt; myMap;
  
  myMap.erase(“key”);// Why I cant do this in C++11?
  </code></pre>
  
  <p>This is so simple in java </p>
  
  <pre><code>Map&lt;std::string, details&gt; map
  map.remove(“key");
  </code></pre>
  
  <p>How can I delete an entry from a std::map using key?</p>
  
  <p>Thanks </p>