I don't think the while (line >> word) is supposed to have be ">>". I changed it to ">" and it runs. But why on earth would it be jumping out of the program early saying a single word is larger the line?
I'm reading a .txt with multiple lines of text. I will need to compare the first word on every line with the words that follow, until a new line is started. I will then do the same thing.
I'm stuck trying to read only one line of strings at a time. I keep reading all the string in every while...
I'm currenty using a given .txt file and comparing the first word (the correct word) to a list words. I need to see where the error is in the incorrect words, so I'm trying to convert it to a character array after I have read the word in as a string. Any idea how I would do this.
I wrote below...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.