By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,665 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,665 IT Pros & Developers. It's quick & easy.

Re: skipping the lines

P: n/a
In article <4fae62b0-6858-4e9e-830e-9eecf6691d4a@
59g2000hsb.googlegroups.com>, fr*********@googlemail.com says...
Could anyone give a simple idea in solving this
i have a text file which has several millions of lines consisting
around 5 coloums
[ ... ]
so when i first read my file i want to take only first line....
when i read it for the second time i want second line skipping the
first line....and so on..
Each time you read from the file, keep track of the file position after
reading. When you read the file the next time, seek to the previously-
stored position, then read one line and update the file position.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.