title: C Errors with FILE*
body: <p>I have the following C code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "helper.h"
  
  int main(int argc, char ** argv){
      if (argc &lt; 4){
      fprintf(stderr, "Usage: ./program_name &lt;DISK&gt; &lt;LOCAL_FILE&gt; &lt;DESTINATION&gt; \n");
      exit(1);
      }
  
      FILE * target; 
  }
  </code></pre>
  
  <p>helper.h is defined as follows:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;errno.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;sys/stat.h&gt;
  #include &lt;fcntl.h&gt;
  #include &lt;sys/mman.h&gt;
  #include &lt;string.h&gt;
  /*
  A bunch of function headers and global variables below, none of which 
  are called target.
  */
  </code></pre>
  
  <p>When I try to compile the above with the following command:</p>
  
  <pre><code>gcc -Wall -o program_name program_name.c
  </code></pre>
  
  <p>I get the following errors:</p>
  
  <pre><code>program_name.c:19:12: error: use of undeclared identifier 'target'
      FILE * target;
             ^
  1 error generated.
  </code></pre>
  
  <p>I've found that deleting the <code>#include "helper.h"</code> statement in the original program stops the compilation errors...but the problem is that I sort of need the methods defined in <code>helper.h</code> and <code>helper.c</code> to complete the program. Any idea what's wrong with it? I'm at my wit's end.</p>