How would I scan a *.txt file line by line to see if any of the lines in the *.txt file matched a string input by the user?
I am hoping that the program, when finished, will take a line input by the user and check a textfile to see if any words in the line match words in the textfile.
I have no idea how this could be done so any help at all is welcome.
Would some kind of For loop work for that?
How would I use that to take each line from the file and compare them individually to a user input string and break the loop as soon as the words matched?