title: A funny thing with sprintf
body: <p>I'm so confused with sprintf that a funny problem with different platfrom.
  Code :</p>
  
  <pre><code>int main () 
  {
      char sql[1024];
      uint32_t app_id = 32;
      uint64_t task_id = 64;
      sprintf(sql, "%u, %u", task_id, app_id);
      printf ("%s\n", sql);
      return 0;
  }
  </code></pre>
  
  <p>The result in console (MSVC2010 debug/release): <b>64, 0</b></p>
  
  <p>But the same code in console(CentOS64 gcc4.4.6): <b>64, 32</b></p>
  
  <p>Any guy will help me, tks!</p>
  
  <p>-------------updated--------------------------</p>
  
  <p>Thanks guys. I have read this article: <a href="https://stackoverflow.com/questions/5140871/sprintf-for-unsigned-int64">sprintf for unsigned _int64</a>  </p>
  
  <p>Actually, <code>PRIu64</code> in <code>"inttypes.h"</code> defined: <code>I64u</code>which is not supported on windows. So I can write like this:    </p>
  
  <pre><code>sprintf(sql, "%I64u, %I32u", task_id, app_id);
  </code></pre>