I need to analyzed some data over and over again with changed parameters each time, how do I get fscanf to read to the end of a file and then start over at the beginning again?
Thanks.
Type: Posts; User: juice_box
I need to analyzed some data over and over again with changed parameters each time, how do I get fscanf to read to the end of a file and then start over at the beginning again?
Thanks.
Oh sorry, those floats are meant to be integers, I was just trying some stuff and I forgot to change it back. Revised code:
int j , i;
int rows = 1;
float num;
int c;
while ((c =...
Hi,
I tried to get my program to count the number of rows in the input data file and then output back the same data with 7 columns and however many rows. It's giving me all zeros in the output file...
Oh hey! I figured it out, I'm not supposed to use %f and declare the variable as a non-float type. Okay cool, thanks anyways.
Thanks, I've fixed up my code. The fscanf function still isn't working right though, I get the right output format but all the values in the matrix are just 0.
I think it's mainly just this part...
Hello,
I'm working on a program that is meant to take a file formatted like:
100 200 300 10 20 30 5
1 2 3 4 5 6 7
12 23 34 45 56 67 78
88 99 33 11 22 55 66
98 87 76 65 54 43 32
There a lot...