title: don't care in scanf
body: <p>Imagine the following:</p>
  
  <p>you read in a string with <code>scanf()</code> but you only need a few of the datapoints in the string.</p>
  
  <p>Is there an easy way to throw away the extraneous information, without losing the ability to check if the appropriate data is there so you can still reject malformed strings easily?</p>
  
  <p>example:</p>
  
  <pre><code>const char* store = "Get: 15 beer 30 coke\n";
  const char* dealer= "Get: 8 heroine 5 coke\n";
  const char* scream= "Get: f* beer 10 coke\n";
  </code></pre>
  
  <p>I want to accept the first string, but forget about the beer because beer is yuckie.
  I want to reject the second and third strings because they are clearly not the appropriate lists for the 7/11;</p>
  
  <p>So I was thinking about the following construction:</p>
  
  <pre><code>char* bId = new char[16];
  char* cId = new char[16];
  int cokes;
  sscanf([string here], "Get: %d %s %d %s\n", [don't care], bId, &amp;cokes, cId);
  </code></pre>
  
  <p>This way I would keep the format checking, but what would I put for [don't care] that doesn't make the compiler whine?</p>
  
  <p>Of course I could just make a variable I don't use later on, but that is not the point of this question. Also checking the left and right side seperately is an obvious solution I am not looking for here.</p>
  
  <p>So, is there a way to not care about but still check the type of a piece of string in scanf and friends?</p>