title: Insert Pair as a key in map using c++
body: <p>I want to know how can insert pair in map using c++, here's my code:</p>
  
  <pre><code>map&lt; pair&lt;int, string&gt;, int&gt; timeline;
  </code></pre>
  
  <p>I tried to insert it using:</p>
  
  <pre><code>timeline.insert(pair&lt;pair&lt;int, string&gt; , int&gt;(make_pair(12, "str"), 33);
  //and
  timeline.insert(make_pair(12, "str"), 33);
  </code></pre>
  
  <p>but I got error </p>
  
  <p><code>\main.cpp|66|error: no matching function for call to 'std::map&lt;std::pair&lt;int, std::basic_string&lt;char&gt; &gt;, int&amp;&gt;::insert(std::pair&lt;int, const char*&gt;, int)'|</code></p>