you need an ifstream object to open the text file, and a string to receive the strings. Both of these are standard c++ classes in <fstream> and <string> header files. There are hundreds, if not thousands, of examples you can follow to write your program so I am not going to repeat them here. Basically you need to (1) read a line using getline function then (2) compare it to the string you are looing for using the == comparison operator.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,947 posts
since Aug 2005