I have a file with a header of two lines, and the rest contains two columns of double data like
0.0030556304 -0.0078125
The first column is 16 characters long, and the second column is 17 characters long, after there is a space and the '\n'.
My code to read this file is
nscan = fscanf(sound_file, "%lf %lf %c", &value1,
&value2,
&termch);
I use termch
to test further for newline character.
I've tried with
nscan = fscanf(sound_file, "%16lf %16lf %c", &value1,
&value2,
&termch);
too.
But when I printf the with
printf("%f %f\n", value1, value2);
the result is
-0.000000 -0.000000
Am I missing something?