title: STL MAP should use find() or [n] identifier to find element in map?
body: <p>I am confused which is more efficient? </p>
  
  <p>As we can access map directly, why do we need to use find?</p>
  
  <p>I just need to know which way is more efficient.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;map&gt;
  using namespace std;
  
  int main ()
  {
    map&lt;char,int&gt; mymap;
    map&lt;char,int&gt;::iterator it;
  
    mymap['a']=50;
    mymap['b']=100;
    mymap['c']=150;
    mymap['d']=200;
  
    //one way
  
    it=mymap.find('b');
    cout &lt;&lt; (*it).second &lt;&lt;endl;
  
    //another way
        cout &lt;&lt; mymap['b'] &lt;&lt;endl;
  
    return 0;
  }
  </code></pre>
  
  <p>thanks in advance! :)</p>