Explore BrainMass

coding a word counter

Seeking help with coding a word counter. I have 2 codes that I'm working with and I not sure where I went wrong with them. Text file with code provided..Visual C++


Solution Preview

There are some hard to understand errors in both of your programs.
For example in 1)
this is probably trying to say that our words cannot be longer than 5 letters!

const int size = 5;
char WordString[size];

Why does word length begin from 5?
int wordlength = 5;

Why does it count a word if wordlength >0, since, according to above, ...

Solution Summary

Help with coding a word counter is achieved.