Raised This Month: $ Target: $400
 0% 

Help about Reading from file strings.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-28-2016 , 19:52   Re: Help about Reading from file strings.
Reply With Quote #6

Remove the "break". That causes the loop to quit execution (i.e. to break out of the loop).

Also, the return value of fgets() is undocumented so it's best to not use it as the condition at all. Using !feof() is more appropriate.
__________________

Last edited by fysiks; 01-28-2016 at 19:54.
fysiks is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode