Hey guys I just wanted to know if there is a way to make a function return the number of rows in a 2 coloumb table of numbers in a txt file. thanx in advance
Hey guys I just wanted to know if there is a way to make a function return the number of rows in a 2 coloumb table of numbers in a txt file. thanx in advance
Yes, there is a way.
Mainframe assembler programmer by trade. C coder when I can.
HOW???
Depends, does the file contain the columns on each line? ie already formatted.
Or is it just a list of numbers? If it's the latter, count the valid lines/numbers (fgets() maybe...) and divide by 2 (columns per row). Otherwise just count the number of lines (if it's the former). You might also want to validate each line, so you don't count empty/invalid lines.
I can do it the divide by 2 way but how can i make it so the comp knows when to stop counting
still cant get it to work!
Do you know how to tell when you are out of data?