getData for multidimensional array! *IMPORTANT

I have to read this input file of arrays. The first column is divers second column is difficulty and third array is 5 judges scores.

HOW do input this file and put them in the arrays:

char divers [MAX_DIVERS][LEN]; //char array for names
double difficulty [MAX_DIVERS]; //array for difficulty
double scores [MAX_DIVERS][JUDGES]; // 2dim array for scores

KNIFE JACK 1.3 6.0 5.1 6.3 5.9 6.5
WILLIAMSON FLIP A 1.4 3.5 4.1 4.7 7.2 3.8
SOMMER TODD 1.2 8.0 9.1 8.1 9.3 9.0
SWAN MIKE 1.1 4.3 2.1 9.9 6.2 7.0


#define MAX_DIVERS 50
#define LEN 20
#define JUDGES 5
/* :::::::::::::::::::::::getData:::::::::::::::::::::::::::
void getData(FILE* fpIn, char divers[][LEN], double difficulty[], double scores[][JUDGES])
{
int i;
int j;

while (fgetc(fpIn) !='\n');

for(i = 0; i < MAX_DIVERS; i++){

fscanf(fpIn, "%c", &divers[i]);

}
..... this is where i need help:D
return;
}
Topic archived. No new replies allowed.