Searching in a text without getline()

Hello,

Does anyone here know how to search for a string in a plain text file without using getline()? The reason I am asking is because the string I am looking for can wrap around lines, and getline() only reads lines whole. So for example, the text

zebra
giraffe
lion
horse


has no line that includes the word RAG, but it exists as the end of zebRA and the beginning of Giraffe. All the implementations I've found for finding a string in a plain text document use getline() but that function is not applicable here.

Any suggestions appreciated,
Kalman
istream::get() will return one character at a time from an input stream including newline characters. You will need toss the newline characters as you read them.
Topic archived. No new replies allowed.