title: defining map with integer and string
body: <p>Im learning about map, this is the first code Im trying, I want to have a map of intgeres and strings.
  here is my code below:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;algorithm&gt;
  #include &lt;map&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  // int map &lt;key, val&gt; :D    sorted by key
  map &lt;int,string&gt; mymap;
  
  int main(){
      int n;
      cin &gt;&gt; n;
      int a;  string b;
      for(int i=0; i&lt;n; i++)
      {
          cin &gt;&gt; a &gt;&gt; b;
          pair&lt;int, string&gt; p;
          //mymap.insert(pair&lt;int, string&gt;(a,b));
          mymap[a] = b;
      }
  
      map&lt;int, int&gt;::iterator it = mymap.begin();
  
      for(it = mymap.begin(); it!=mymap.end() ; it++)
          cout &lt;&lt; it-&gt;first &lt;&lt; ' ' &lt;&lt; it-&gt;second &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>but I get so much errors I dont Understand where Im wrong.
  Would you please help me to understand where Im wrong?!</p>
  
  <p>Thanks in advance</p>