How do we determine array size?


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

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?


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]