title: No matching function for call to sscanf
body: <p>Why am I getting this error with <code>sscanf</code>, having included <code>&lt;cstdio&gt;</code> and opened <code>file</code>?</p>
  
  <p>I'm doing main:</p>
  
  <pre><code>string  line;
  int     num = 0, i;
  while(getline(file, line)){
      ++num;
      if (sscanf(line, "%d", &amp;i) == 0) --num;
  }
  </code></pre>
  
  <p>and getting error <code>No matching function for call to 'sscanf'</code>.</p>
  
  <p><code>sscanf</code> ref: <a href="http://www.cplusplus.com/reference/cstdio/sscanf/" rel="nofollow">http://www.cplusplus.com/reference/cstdio/sscanf/</a></p>