[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