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.Code:ifstream choice_one_op_in ( "C:\\Program Files (x86)\\Electronic Arts\\Crytek\\Crysis\\Game\\Config\\diff_easy.cfg"); string token; string line = "g_godMode = 1"; while(!choice_one_op_in.eof()) { getline(choice_one_op_in,token); 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.