Comparing two strings

I'm currently building a program where I need to search two strings, one of which is the search term and the other is a string already located in the .dat file.

I'm stuck here. Should I search character by character, or search the entire line at once? I'm guessing I have to use get() or getch(), but I don't know how to proceed.

Please post which method is better and why, and also submit code if possible.

Thanks!

I think best would be to use std::string::find algorithm.
http://www.cplusplus.com/reference/string/string/find/
Topic archived. No new replies allowed.