View Single Post
Old 05-07-2014, 01:04 AM   #27
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default

The problem is that if you don't want to read the whole file in one go, you need the FILE pointer to be moved from the start of the file to where you finished the last read.

Use fread(), it moves the pointer automatically, and allows you to read any number of numbers in each call. I think binary mode will be better than text.

http://msdn.microsoft.com/en-us/library/kt0etdcs.aspx
Quote:
The file pointer associated with stream (if there is one) is increased by the number of bytes actually read.
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote