469,579 Members | 1,023 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Re: skipping the lines

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
0 1151

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Chuck Anderson | last post: by
5 posts views Thread by ColinWard | last post: by
3 posts views Thread by Ivan Liu | last post: by
6 posts views Thread by lisa.engblom | last post: by
7 posts views Thread by Gustaf | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.