So i've been struggling with this program and everytime I figure something out I get stuck on something new.The program is supposed to count the number of words, consonants, digits, and sentences in a file. I figured out the digits and consonants with some help but I'm struggling with the words and sentences.
An over simple and not quite right way to count sentances is simply to count the number of times '.' appears in the file. To do it right you're looking at A LOT of work.
For your word counting function getline(...) is your problem, this looks for a return carridge deliminator. Replace getline(...) with something like input >> tempstring. It looks like the count_words(...) function is trying to count the words in the sentence, is this the case? If it is we have to go about it in a differant way.
Also shouldn't most of these functions be returning int's?