title: Best practice for reading csv (with variable number of lines) into data structures
body: <p>I'm writing a small program to read in a csv with a variable number of lines and have a question about best practices:</p>
  
  <p>Is the best way to create storage for the data on each line to make an array that holds the data structures of the csv (one per each line of csv)?</p>
  
  <p>Size allocated to the array could be set to a large number (for example, more lines than there would ever reasonably be in the csv)? <em>I have seen this in many examples on the web.</em></p>
  
  <p><strong>Or</strong>... is there was a smart way to tell how much space would be needed such as counting the lines before hand or dynamically adding space by using a linked list as opposed to an array with static storage allocation. Any best practices? I don't think choosing a random number seems very slick...</p>
  
  <p>Any thoughts would be greatly appreciated. </p>