title: C getline() - how to deal with buffers / how to read unknown number of values into array
body: <p>First of all, some background: I'm trying to get in a list of integers from an external file and put them into an array. I am using getline to parse the input file line by line:</p>
  
  <pre><code>int lines = 0;
  size_t * inputBuffer = (size_t *) malloc(sizeof(size_t));
  char * storage = NULL;
  </code></pre>
  
  <p>I am calling getline like so:</p>
  
  <pre><code>getline(&amp;storage, &amp;s, input)
  </code></pre>
  
  <p>I heard from the man page on getline that if you provide a size_t * buffer, you can have getline resize it for you when it exceeds the byte allocation. My question is, what can you use this buffer for? Will it contain all of the items that you read with getline()? Is it simpler to read from this buffer, or to traverse the input in a different way when putting these integers into an array? Thanks!</p>