So I just started programming and im working on a program that will calculate how many sentences/words/syllables are in a .txt file and i have to use comand line to open. There are other questions similar to this but i still cant figure it out. here is what i have so far
i got it to work when i used the file path user input but i cant with the comand line way i left most of the old code i used just to show you were i have been
i got it to work when i used the file path user input but i cant with the comand line way
Well, it looks like you've tried the right function: it's infil.getline() that you need to read a line from your text file, rather than reading just a char with get().
Ths code you posted confised me a moment as you#re trying to pass a char (c) to functions (sentenceCount, etc.) which take a char*,
This just reads the file and writes it out line by line (it's mostly just some of the bits you commented out)
Thanks for the input i finally got it to work. This was an assignment and the the lab said that ; : ended a sentence i thought that was a little weird to