Around 20 rows is a bit vague. In the code I posted, I just needed 19 rows, but depending on the file I am reading in, it could be a few more or less. So far, I've been counting the number of rows...
Type: Posts; User: mike112358
Around 20 rows is a bit vague. In the code I posted, I just needed 19 rows, but depending on the file I am reading in, it could be a few more or less. So far, I've been counting the number of rows...
Thanks tabstop, that fixed it.
I noticed that was happening, but I'm not sure how I would put read as the while test. Could you show me what that would look like?
Thanks for the help everyone! In case anyone has the same problem, my code now looks like this:
relevant part is lines 28-45
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Thanks!
I've managed to get fgets partially working- it scans one line then stops. How would I make it scan the whole file?
Hi, I'm a beginner at programming and I'm not sure how to read in information from a text file. What I want to do is take a text file which contains around 20 rows and 3 columns of numbers, and put...