I want to process the contents of a config file. The config file could be any size. I am getting a Bus Error, after the program hangs, when I run the following code:
You can allocate memory with malloc:
malloc
buffer = malloc(number_of_bytes_to_allocate); if(buffer == NULL) { // error allocating memory }
free when you're done with it!
free
free(buffer);