storing vector for a key in map in c++ and accessing the vector for key by iterating through map
<p>How do create a vector for a certain key in map in c++ and how to access them ?
suppose i accept data in this format </p>

<pre><code>   100 6 7
   56 7 8
   100 90 8
   100 8 9
</code></pre>

<p>Here 100 and 56 in first column are keys and for key 100 i need to create a vector containing elements 6 7 90 8 8 9
and for key 56 ,vector should be 7 8
.How can we do this in c++ and at same time how to access the vector for a certain key in c++?
I tried to inset vector a key this way but could not access the vector for key by iterating through map .</p>

<pre><code> int k;
cin&gt;&gt;k;
for(int i=1;i&lt;=k;i++){
    int r,c1,c2;
    cin&gt;&gt;r&gt;&gt;c1&gt;&gt;c2;
     mymap[r].push_back(c1);
     mymap[r].push_back(c2);

}
</code></pre>

<p>HOW can we do it in c++ using map ?</p>