title: GCC throws error upon compilation: error: unknown type name ‘FILE’
body: <p>I am making a function which is just writes <code>&quot;hello&quot;</code> to a file. I have put it in a different file and included its header in the program. But gcc is giving an error namely:</p>
  <blockquote>
  <p><code>error: unknown type name ‘FILE’.</code></p>
  </blockquote>
  <p>The code is given below</p>
  <p><code>app.c</code>:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &quot;write_hello.h&quot;
  
  int main() {
      FILE* fp;
      fp = fopen(&quot;new_file.txt&quot;, &quot;w&quot;);
      
      write_hello(fp);
      
      return 0;
  }
  </code></pre>
  <p><code>write_hello.h</code>:</p>
  <pre><code>void write_hello(FILE*);
  </code></pre>
  <p><code>write_hello.c</code>:</p>
  <pre><code>void write_hello(FILE* fp) {
      fprintf(fp, &quot;hello&quot;);
      printf(&quot;Done\n&quot;);
  }
  </code></pre>
  <p>when compiling by gcc the following occurs:</p>
  <pre><code>harsh@harsh-Inspiron-3558:~/c/bank_management/include/test$ sudo gcc app.c 
  write_hello.c -o app
  write_hello.c:3:18: error: unknown type name ‘FILE’
   void write_hello(FILE* fp) {
  </code></pre>