The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 installing SR4 for version 7
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

evanm

Canada
Posts

Posted - 08/20/2004 :  03:56:29 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 08/20/2004 :  07:48:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000