Originally Posted by
abood1190
how can i use arrays ... can you give me hints
Do you not have a textbook you can refer to? These are complex matters not exactly easy to convey in a forum posting. Some extra study would be a good idea at this point... Grab some C programming tutorials from the web and read up...
In fact... (CLICK HERE)
For example...
Code:
int Docking_ID[10];
int Max_size[10];
int Time_Taken[10];
int Cargs[10];
//....
fscanf(file1,"%d %c",&Num_Of_Bays,&Harbour_Name);
for (i=0;i<Harbour_Name;i++)
fscanf(file1,"%d %d %d %f", &Docking_ID[i], &Max_size[i], &Time_Taken[i], &Chargs[i]);
But there are better ways, the tutorials should help you figure that out.