I'm doing something wrong....
If I have a multirow file with three fields per row like
and I want to read it in and manipulate the numeric fields independently, why won't this work:
If I have a multirow file with three fields per row like
Code:
1 3.123 "line 1"
2 29l.2 "line 2"
3 42.45 "line 3"
and I want to read it in and manipulate the numeric fields independently, why won't this work:
Code:
int num[3], i;
float data[3];
char text[30];
main(){
for (i=0; i<2; i++){
pointer = fopen(filename, "r"));
fscanf(pointer, " %d %f %s", &num[i], &data[i]), &text);
}
}