Just a little help ...
[php]// pulls the words out of a text stream
string get_word(istream& in)
{
char ch;
string s;
while(in.get(ch))
{
// these characters separate the words
if (ch == ' ' || ch == ',' || ch == '.' || ch == '\n' || ch == '\t')
break;
s.push_back(ch); // build the word
}
return s;
}
[/php]
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
Offline 5,792 posts
since Oct 2004