title: Can't write int to file using fwrite
body: <p>I'm trying to format my keylog output so it shows time:</p>
  
  <pre><code>        t = time(0);
          now = localtime(&amp;t);
  
  
          if(now-&gt;tm_min != prevM &amp;&amp; now-&gt;tm_hour != prevH)
          {
              prevM = now-&gt;tm_min;
              prevH = now-&gt;tm_hour;
  
              fwrite("[", 1, sizeof(WCHAR), keylog);
              fwrite(&amp;prevH, 1, sizeof(int), keylog);
              fwrite("]", 1, sizeof(WCHAR), keylog);
              fwrite(" ", 1, sizeof(WCHAR), keylog);
              fflush(keylog);
          }
  </code></pre>
  
  <p>but instead of readable number I get "[ DLE NUL ] " written in my file, where DLENUL is question mark. </p>
  
  <p>How do I make it to write a readable number?</p>