I'm trying to read in a bunch of strings into an array from disk and then having the program write them back to a file. My problem is that it fails while trying to read and I don't know what's causing it.
Code:#define MAX 5 void loadfile(char * array[MAX]) { /* Reads in file */ int count; FILE * fp; fp = fopen("strings.txt","r"); for(count = 0; count < MAX;count++) { fscanf(fp,"%s ",array[count]); } fclose(fp); }