Here's the beginning of a class for you :
class WordCounter
{
public:
WordCounter( const char * w )
: word( w )
{
count = 0;
}
public:
std::string word;
int count;
};
In your
main
function you can make an instance of a collection of these. You have used a vector previously and that's a good choice for this :
int main()
{
std::vector< WordCounter > words;
}
Hopefully that's enough to get you started.