Sure thing. I wanted to count the frequency of each unique word in the input. The way I initially tried to solve this was to move the words into a two dimensional array.
The problem I had was that I didn't know you couldn't have mixed data types in the array! I ended up being able to print out my strings or my counts. Since that was no good I built a simple struct that contained a string and an int and put it in a 1d array.
The simplest way is to use standard container std::map<std::string, int>
For example
1 2 3 4 5 6 7 8 9 10 11 12 13
std::string s;
std::cout << "Enter a sentence: ";
std::getline( std::cin, s );
std::istringstream is( s );
std::string word;
std::map<std::string, int> m;
while ( is >> word ) m[word]++;
So now the map contains frequencies of all words in the sentence.