Hi, first question here!
I'm writing a grep type program for Windows, just for fun (using Mingw). It works well for text files where lines are terminated by '\n'. I'm using fstream::getline() for this.
But I also need to be able to search files containing just a giant block of text with no line numbers. fstream::getline() fails here. Is there any function to read N characters into a buffer from such a file?
Also, what's the best way to tell the user where the match was found in such a file?