F
fl
Hi,
Although I have check the description of sscanf, I am still puzzled at
the following lines which are from someone else. 'str' is string
"1x10". sscanf should assign the string sequencially to prop, n and
junk from my understanding. The example is in a float number, integer
and char. sscanf assigns the destination variables according to the
format sequence?
..................
int n;
double prop, sum;
char junk;
scan_num = sscanf(str, "%lgx%d%c", &prop, &n, &junk);
...................
Although I have check the description of sscanf, I am still puzzled at
the following lines which are from someone else. 'str' is string
"1x10". sscanf should assign the string sequencially to prop, n and
junk from my understanding. The example is in a float number, integer
and char. sscanf assigns the destination variables according to the
format sequence?
..................
int n;
double prop, sum;
char junk;
scan_num = sscanf(str, "%lgx%d%c", &prop, &n, &junk);
...................