C++ Identifying the Frequency of words occurring in a sentence
<p>What is the best STL to use for this task? I've been using <code>Map</code>, 
and I couldn't get it to work. I'm not sure how I am supposed to check the number of same words that occur in the sentence for example: </p>

<blockquote>
  <p>I love him, I love her, he love her.</p>
</blockquote>

<p>So I want the program to prompt the user to enter an integer, lets say i enter 3, the output will be love as the same word occurs 3 times in the sentence. But what method to use if I want to do a program like this?</p>

<p>Currently my program prompts for the user to enter the word, and then it shall return how many time that word occurs, which for word love, is 3. but now i want it the other way round. Can it be done? Using which STL will be better?</p>
