Hello,
In what circumstance does scanf return a value of '-1'?
Also, using arrays (and 'for loops'), how could I 'count' the number of 'rows' of data that scanf scans in. (so that I can use it with printf later without printing the maximum number of 'rows' that I've set).
Eg, if I've set my max number of rows to be 500 and I only scan in 100 rows of data, how can I print only the 100 rows of data? I know that I need to place a counter somewhere, but whenever I do this, the counter is always the maximum number of rows, which is what I've set, meaning that scanf is running for the full 500 instances (the max number), instead of just 100.
Thanks