I am workng on a progam to read txt in a file and print it to the screen. Every fifth word I sub an underline till eof. I have to read in each char. My issue is that I need to compare the present value with the last read. If present value is a char and previous value is not a char I have a new word and can increment my counter. At the fifth word I sub a constant string" ___________"
I am using wordCount % 5 = 0 to activate and so my count doesn't need to reset a count control loop.
<inFile.get (ch);