Problem searching for a string in a text file. Help?
Alright, I've been searching and digging through threads for a couple of hours now, and haven't really found anything I can use/understand.
The idea is that the program searches through a configuration file looking for the string. If it's found, it needs to return an error message.
ifstream choice_one_op_in ( "C:\\Program Files (x86)\\Electronic Arts\\Crytek\\Crysis\\Game\\Config\\diff_easy.cfg");
string line = "g_godMode = 1";
if (token.find(line, 0))
cout << "The program found the word: " << line << endl;
Can anyone explain to me what I'm doing wrong?
Thanks in advance.