title: Format specifier for templated type
body: <p>I've got a C++ class that's templated on the integer type, e.g.,</p>
  
  <pre class="lang-cpp prettyprint-override"><code>template&lt;typename int_type&gt;
  </code></pre>
  
  <p>Say that somewhere in that class, I'd like to use <code>sscanf</code> for reading some values from a file, e.g.,</p>
  
  <pre class="lang-cpp prettyprint-override"><code>int_type num_rows;
  fgets( buffer, BUFSIZE, in_file );
  sscanf( buffer, "%d", &amp;num_rows);
  </code></pre>
  
  <p>The format specifier only works correctly if the <code>int_type</code> is the intrinsic <code>int</code>.</p>
  
  <p>Is there a better way of treating the format specifier for general <code>int_type</code>?</p>