Thanks VernonDozier,
The idea was evaluate every character of a text file (say a text of a newspaper for example) and separate words. Valid words would be strings of char from 'a' to 'z' only.
At the time a space is encountered I'd make a new line. I fact if I modify the while loop and use the following code instead:
while (iDic.get (ch))
{
ch= tolower(ch);
if (ch == ' ')
iDic.putback('\n');
oDictionary<< ch;
}
the programme does pretty much what I want but I still don't know what to do the commas, etc (that is every thing having an ascii code outside the a-z range)
Reputation Points: 34
Solved Threads: 2
Junior Poster in Training
Offline 88 posts
since Aug 2008