Raised This Month: $51 Target: $400
 12% 

read_file problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-28-2012 , 15:24   read_file problem
Reply With Quote #1

if theres an empty line in the end of file, read_file will read it as the previous line, why is that?

Last edited by jimaway; 06-28-2012 at 15:24.
jimaway is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-28-2012 , 15:34   Re: read_file problem
Reply With Quote #2

Use feof/fgets, they work better.
__________________
<VeCo> is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-28-2012 , 18:47   Re: read_file problem
Reply With Quote #3

read_file() is an old function and is not efficient. Use fopen(), feof(), and fgets().
__________________
fysiks is offline
Reply



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 07:43.


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