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
As two others pointed out, std::multimap can be your solution.
std::multimap
Also consider std::tr1::unordered_multimap. It is available in VS 2008 seems to have it, GCC has it at least from version 4.3.
VS 2008
GCC
4.3