I need to read a text file, parse file, and check occurence of words without leading or trailing punctuations.
this is what i have so far,
std::ifstream f("textfile.txt");
std::istream_iterator<std::string> eof;
std::multiset<std::string> words( std::istream_iterator<std::string>(f) , eof);
for( std::multiset<std::string>::iterator i = words.begin(); i!=words.end(); i = words.upper_bound(*i) )
std::cout << *i<< ": " << words.count(*i) << " times\n";