A
Amadeus W.M.
Does iostream::read() throw any exception already, or do I have to
check with iostream::fail()? Like this:
fstream IN("myfile", ios::in | ios::binary);
char buf[100];
IN.read(buf, 100);
if(IN.fail()) throw "bad input";
Is there any other way to catch bad input? I'm guessing not.
check with iostream::fail()? Like this:
fstream IN("myfile", ios::in | ios::binary);
char buf[100];
IN.read(buf, 100);
if(IN.fail()) throw "bad input";
Is there any other way to catch bad input? I'm guessing not.