Reading a multimap<int, string> from a file
<p>I need to read a <code>multimap&lt;int,string&gt;</code> from a file and i can't figure out how to do it.</p>

<pre><code>ifstream in ("words.txt");
multimap&lt;int, string&gt; words;
int count = 0;
while (!in.eof()) {
        getline(in, words[count]);
        count++;
}
</code></pre>

<p>When i run it i get this error <code>error: no match for ‘operator[]’ (operand types are ‘std::multimap&lt;int, std::__cxx11::basic_string&lt;char&gt; &gt;’ and ‘int’)
   getline(in, words[count]);</code>
I tried with <code>in &gt;&gt; words[count]</code>, and it doesn't work too. How should i fix this ?</p>