Results 1 to 8 of 8

Thread: [RESOLVED] Count # of lines in a file?

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    259

    [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.
    SonicMailer Pro
    The best mailing list manager has just gotten better!
    Click here for a full list of features!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width