arrays - Loading data from file in C -
I am struggling to load some numerical floating point data in C program in a program ... file In the floating point, the numbers with the accuracy of 3 decimal digits, each of which is in a row ... I wanted to load these values in a float array and then count it something in ... though I used to call it a float Tried to load in the array, Ekin it did not properly stored values ... ie 123.45 as value were stored as 123.44999 or something .. but I do not want it.
I tried to store it in an array of wire and then convert them into scaled integers but I can not get it to load in an array of strings I can tell where I am wrong. Everything I have done is something like this.
Unsigned four ** data ............ data = molok (sizeoff (unsigned char *) * fileSize); ............ (Fif (FP) (if (fscanf (FP, "% s", and data [J]) == 1) // If changed, increment counter + + J;} ...........
I am a newbie, so I am not so good with the indicators and when I load it in string array, So how do I convert it to the scaled integer?
read (D );
(int) can be used
(D * 100) to get int.
Comments
Post a Comment