T O P I C R E V I E W |
evanm |
Posted - 08/20/2004 : 03:56:29 AM If I install SR4 is it still ok to use stdioFile::ReadString even though it does not return false correctly? So say I use this method but do not check or care what it returns.
Thanks, Evan.
Edited by - evanm on 08/20/2004 05:00:36 AM |
1 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 08/20/2004 : 07:48:30 AM Hi Evan,
That bug is important only if you rely on the return value. It still reads the line correctly. For example, the following code will type the contents of test.dat but will never stop (you'll never see Done). The fix is usually trivial... in this case the commented-out break might be good enough.
string strLine; stdiofile ff("C:\\data\\test.dat",file::modeRead); while ( ff.ReadString(strLine) ) ( //if( strLine.IsEmpty() ) break; out_str(strLine); } out_str(Done);
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 08/20/2004 07:52:02 AM |
|
|