|
-
Nov 3rd, 2002, 12:41 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Count # of lines in a file?
I am making a game, and info is stored in a text file. I need to know how many lines are in the text file, and it will never be a "set number".
Is there anyway to quickly count the lines? Currently, I am reading the file and increasing a counter, and then reading the file again for the data. Another option I thought about was to write the number of lines to the first line in the file (-1 of course... since you don't want that piece of info).
Any more information or suggestions would help!
Thanks
Last edited by kandieman101; Nov 3rd, 2002 at 02:30 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|