R
Roy Smith
I've got some old code I'm working on which looks like this:
std:fstream fstr;
fstr.open(filename, mode);
if (!fstr) {...}
I don't understand the if(!fstr) test. From what I can see in the
references I've got handy, that should be if(fstr.fail()) {...}, but
the current code seems to work. Is this correct/portable code?
std:fstream fstr;
fstr.open(filename, mode);
if (!fstr) {...}
I don't understand the if(!fstr) test. From what I can see in the
references I've got handy, that should be if(fstr.fail()) {...}, but
the current code seems to work. Is this correct/portable code?