title: "invalid conversion from 'FILE* {aka _iobuf}' to 'int'" error
body: <p>I want to change size of *.txt file, which is created before. For this i use <code>chsize</code>. 
  Code: </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  #include &lt;io.h&gt;
  
  using namespace std;
  
  int main()
  {
      FILE *wfile; 
      wfile = fopen("test.exe", "a");
      chsize(wfile, 1024); //error is here
      file.close();
      return 0;
  }
  </code></pre>
  
  <p>And here goes the error:</p>
  
  <blockquote>
    <p>[Error] invalid conversion from 'FILE* {aka _iobuf*}' to 'int'
    [-fpermissive]</p>
  </blockquote>
  
  <p><strong>Q:</strong> What is wrong here? I opened the file with <code>fopen</code> right how it explained in the internets.</p>
  
  <p><strong>Q2:</strong> I love Windows as a OS, but I don't want to learn Windows API for C++ or something like that. Is there a option to use something portable?</p>