title: sscanf format c++
body: <p>I have a sscanf statement as</p>
  
  <pre><code>sscanf (fieldname, "%s_%d", name, id);
  </code></pre>
  
  <p>I am giving input as frog_461 but it displays name as "frog_461" and 0 for id. Can you please suggest the correct way to give input to make this statement work? Like in the above example how should I give my input so that name="frog" and id=461. Thanks. </p>
  
  <hr>
  
  <p>I appreciate all your input. Currently I cannot modify the code, therefore I am not trying to find an alternate way of getting it to work. I am just checking if this code was working earlier and if yes then what input the user must have given to make it work. Thanks.</p>