Posted by Aaron Faust on March 14, 2001 at 00:11:16:
Ok, so the array is to be 1.25 times bigger than the number of entries in the file. Is there a "nice" way to determine how many entries are in the file - the only way I can figure is to go entirely through each file once just counting lines, then open the same file again to actually load the entries into the newly created array of the size that was just determined. Since we can't resize our array dynamically, this seems like the only alternative, but it also seems a bit cheesy. Am I missing something?
Post a Followup