M
Micah Cowan
Ben Bacarisse said:This looks a little odd although it is fine. There is no reason to assign
to read the value of the test (fscanf(...) != EOF) since you use read only
on the next line and you can't get to the next line unless read is 1.
while (fscanf(fp, "%lf", &number) != EOF) {
does the same job.
It seems very likely that EdUarDo wanted:
while((read = fscanf(fp, "%lf", &number)) != EOF) {
In which case, he'll still want to test read on the next line.