Why doesn't ifstream read to the end?
- by user146780
I'm making a notepad-like program. To get the text from a file I read each character into the buffer by doing
while (!file.EOF())
{
mystr += file.get();
}
however if I load in an exe it stops after MZ but Notepad reads the whole exe.
I set my ifstream to binary mode but still no luck. What am I doing wrong?
Thanks