Hey,
I'm using sscanf to read from buffer into int and double variables, but it doesn't recognise the decimal numbers.
Code:
fgets(line, sizeof line, inp);
check = (sscanf(line, "%s %d %d %f %d %d %f %f", dl.Param, &dl.Label,
&dl.SFactor, &dl.SigBits, &dl.Bit30, &dl.Bit31, &dl.Max, &dl.Min));
// and
CString Param;
int Label, SigBits, Bit30, Bit31;
double SFactor, Max, Min;
if I have line = " FUELFLOW= 160 0.5 16 1 1"
check returns 3 when I'd like it to return 6. How can I make it read in the 0.5 all together into SFactor?