There's two options. You can use the C++ standard library and read in a file with
ifstream, or use a
FILE* pointer and fopen() and read in the file the old-fashioned way with cstdio. If you need an explanation on how to open and read a file, feel free to post here again or PM me. Once you've opened the file, you have to options.
1. You can read the entire text file all at once into a memory buffer and then search for your text using
strstr(), which returns a pointer to the start of the sub-string you searched for.
1. Alternatively, you can read in the file line at a time (using
gets() with FILE* pointers/fopen() and
ifstream::getline() for ifstream) and search each line you load in with strstr().
If you're using FILE* pointers, don't forget to call fclose() on the file when you're done.
As I said, feel free to let me know if you need any more help.