It is not possible to find out how many lines of data there are when you open a file. You could perform reads to count it and then rewind and re-read the data or if you are on unix and put the result of "wc -l file1.dat" into a file, you could read that file to find out how many lines are in file1.dat.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.