Use two loops.
Code:
while ( fgets(buff,SIZE,dosya) ) {
if ( buff[0] == 'E' ) break;
sscanf(buff," %f %f %f %f %f %f ",&musteri.id[i],&musteri.x1[i],&musteri.x2[i],
&musteri.x3[i],&musteri.x4[i],&musteri.x5[i]);
i++;
}
fgets(buff,SIZE,dosya); // burn the header line
while ( fgets(buff,SIZE,dosya) ) {
if (buff[0] == 'A') break;
sscanf(buff," %f %f %f %f %f ",&hat.id[j],&hat.x1[j],&hat.x2[j],
&hat.x3[j],&hat.x4[j]);
j++;
}
It's odd that you have the arrays inside your struct.
Code:
struct musteri{
float id[10];
float x1[10];
float x2[10];
float x3[10];
float x4[10];
float x5[10];
}musteri;
Most people would do this.
Code:
struct musteri{
float id;
float x1;
float x2;
float x3;
float x4;
float x5;
} musteri[10];