Originally Posted by
@nthony
Well firstly, I expect this is a code snippet of some broken for loop, as you've declared an index variable (i) that does not increment/decrement.
Secondly, the check for fscanf agains EOF looks like you meant it to be part of a conditional statement that never got around to uh.. being conditional...
Thirdly, and here's the crasher, you specifiy seven arguments for fscanf, yet only provide 6.
Fourthly, (another potential crasher), you are using %d conversion specifiers for reading in doubles, which should be %lf.
And fifthly, (yet another crasher), is that if the file "Data1.txt" is not found, then a NULL pointer is returned by fopen.
I've never seen so many errors in a small snippet of code, and there probably are even more, I just gave up checking after five. Here's my advice: CTRL+A --> DEL. Start again, don't "borrow" code from others, and think through every statement you type, if you are unsure, consult the all-knowing GoogOracle.
edit: damn you guys are fast!