954,480 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

FILE * start at specific line

Hi again.

I have a file that have about 1000 lines, and then, time by time I need to read some of this lines, for example:

13:00:00 read lines 01 to 100;
13:30 read lines 101 to 400;
....
15:00:00 read lines 900 to 1000.

There is a way to start the pointer of fgets or fscanf starts at the specific line?

Or i realy need to scan all file until the start line?

dondajr
Light Poster
33 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

You'll really have to scan the file for the line. There's no telling where any specific lines start.

WaltP
Posting Sage w/ dash of thyme
Moderator
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
 

Ok..

thanks man..

dondajr
Light Poster
33 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: