title: How to add the results from the iteration to new multimap in c++?
body: <p>How to insert  result into a new multimap?? I am trying to search over dictionary container to find keyword given by the user and I need to iterate over the tempCollector to find distinct elements. But, I can't seem to find a way to store the results in tempCollector.</p>
  <pre><code>//current container with all the data
  multimap&lt;string, DictionaryItem&gt; dictionaryContainer;
  void search(vector&lt;string&gt; input) {
      if (dictionaryContainer.empty()) {
          cout &lt;&lt; &quot;it's empty&quot;;
      }
      int inputSize = input.size();
      string tempKeyword = input[0];
      //need to copy or insert the value and keys to the tempCollector
      multimap&lt;string, DictionaryItem&gt;tempCollector;       
      //iteration to find keyword; want to store the result in tempCollector
      auto its = dictionaryContainer.equal_range(tempKeyword);
      for (multimap&lt;string, DictionaryItem&gt;::iterator itr =its.first; itr != its.second; itr++) {
          itr-&gt;second.print();          
      }
  };
  </code></pre>