I try to make a string array with 5 element to access data file, but I'm so mess up!! So can somebody take a look at my code and help me out? thanx for any help.
sample data file:a.dat
my code:Code:aa bb cc dd ee
Code:typedef char TYPE_PLANE[3]; /*funtion to access data File opened already*/ int get_type(TYPE_PLANE type[5], int *number, FILE *infile) { int i; TYPE_PLANE word[5]; fgets(word, 5, infile); strcpy(type, word); }