I have an string array filled with words from a sentence.
words[0] = \"the\"
words[1] = \"dog\"
words[2] = \"jumped\"
words[3] = \"over\"
words[4] = \"the\"
word
you can use a multimap from the STL and use the call
pair equal_range(const key_type& k)
to get a range of iterators that match your key
personally i find this slightly clunky due to having to deal with iterator ranges rather than just getting an object back that represents all values for that key. to get around that you could also store a vector in a regular map and add your strings to the vector.