I have sscanf instruction as
sscanf (fieldname, "%s_%d", name, id);
I give input as frog_461, but it displays the name as "frog_461" and 0 for id. Can you suggest the right way to contribute to make this expression work? As in the example above, how should I give my input so that name = "frog" and id = 461. Thank you.
I appreciate all your input. Currently I cannot change the code, so I am not trying to find an alternative way to make it work. I just check if this code worked before, and if so, what input should the user give in order to make it work. Thank.
source
share