C :: Seg Fault When Reading File Of Names Into Array
Jun 19, 2014I am having trouble reading in a file of 10 names into an array. Ive already allocated the memory, I just keep getting a seg fault when I try and read in the names.
Code:
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_STRING_LEN 25
void insert_data(char **strings, const char *filename, int size);
void allocate(char ***strings, int size);
[Code] ....
And then the list that I have to read in is as follows:
matt
susan
mark
david
aden
phil
erik
john
caden
mycah