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:
int lines = 0;
size_t * inputBuffer = (size_t *) malloc(sizeof(size_t));
char * storage = NULL;
I am calling getline like so:
getline(&storage, &s, input)
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!