title: Invalid conversion from 'FILE* {aka _IO_FILE*}' to 'int'
body: <p>When trying to compile this little example...</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  
  int main(void) {
      FILE *foo;
      foo = fopen(&quot;bar.txt&quot;, &quot;rt&quot;);
      lseek(foo, 5, SEEK_CUR);           // This line is getting compiler error
      fclose(foo);
      return 0;
  }
  </code></pre>
  <p>...I get a compiler error regarding the call to <code>lseek()</code>. The output is:</p>
  <pre><code>main.cpp|8|error:     invalid conversion from ‘FILE* {aka _IO_FILE*}’ to ‘int’ [-fpermissive]|
  unistd.h|334|error:   initializing argument 1 of ‘__off_t lseek(int, __off_t, int)’ [-fpermissive]|
  </code></pre>
  <p>For the record: I have also tried using both <code>lseek(*foo, 5, SEEK_CUR);</code> and <code>lseek(&amp;foo, 5, SEEK_CUR);</code>, but that only makes things worse. (I really didn't expect that to solve anything either.)</p>
  <p>Referring to the <a href="http://linux.die.net/man/3/lseek" rel="nofollow noreferrer">man-page for lseek(3)</a>:</p>
  <blockquote>
  <p><strong>Synopsis</strong><br />
  off_t lseek(int <i>fildes</i>, off_t <i>offset</i>, int <i>whence</i>);</p>
  <p><strong>Description</strong><br />
  The lseek() function shall set the file offset for the open file description associated with the file descriptor <i>fildes</i>, as follows:</p>
  <p>[........]</p>
  </blockquote>
  <p>I interpret this to mean that the first argument should be the <i>file descriptor</i>, which in this case is <i>foo</i>.</p>
  <p><strong>Q: What's wrong here?</strong></p>