title: Warnings using format strings with sprintf() in C++
body: <p>Compiling this lines</p>
  
  <pre><code>    long int sz;
      char tmpret[128];
  
      //take substring of c, translate in c string, convert to int, 
      //and multiply with 1024
      sz=atoi(c.substr(0,pos).c_str())*1024;
  
      snprintf(tmpret,128,"%l",sz); 
  </code></pre>
  
  <p>I read two warning on snprintf line:</p>
  
  <pre><code> warning: conversion lacks type at end of format
   warning: too many arguments for format
  </code></pre>
  
  <p>Why? The type is specified (long int sz, and %l in snprintf) and the argument in snprintf is only one. Can anybody help me? Thanks.</p>