title: Finding a way to push_back matched key and values from a map into vector
body: <p>I had code that was similar to this in Java, but getting it to work in C++ is a different story. Currently, this function does find the key correctly and pushes the key to the back of my vector. I would like to grab both the key and its pair of values to all be inserted into the same index of the vector. I have looked into using a pair for my vector so it would be (key, pair of values), which I am not sure I am able to do.</p>
  
  <pre><code>vector&lt;string&gt; getIfPresentPartOfSpeech(multimap&lt;string, pair&lt;string, string&gt;&gt; dictionary, string name) {
      vector&lt;string&gt; response;
      auto it = dictionary.begin();
      while (it != dictionary.end()) {
          // Check if value of this entry matches with given value
          if (it-&gt;second.first == name) {
              // Yes found
              // Push the key in given map
              response.push_back(it-&gt;first);
          }
          // Go to next entry in map
          it++;
      }
      return response;
  }
  </code></pre>