I need to read the total amount of columns per line from a file. I have absolutely no clue what to put in the loop. Any help is welcome. Thanks.
Code:void numofcol (int input) { FILE* spData; FILE* spOut; float line; spData = fopen ("lab7a.txt", "r"); spOut = fopen ("output.txt", "a"); while ( (fscanf (spData, "%f", &line)) == EOF) { } return; }



LinkBack URL
About LinkBacks



