title: Syntax error in method signature in .h file
body: <p>I'm trying to write a C concordance program that reads words in from a file, strips them of non-alphanumeric characters, counts the number of times they occur, and prints them out, sorted and formatted, to a file containing the word and it's corresponding count in the text. </p>
  
  <p>I'm running into this compiler error and I cannot figure out what the issue is, especially since it has no problem with the node *top in the previous method signature...</p>
  
  <p>The error I'm getting is:</p>
  
  <blockquote>
    <p>proj1f.h:12: error: syntax error before "FILE"</p>
  </blockquote>
  
  <p><code>.h</code> file:</p>
  
  <pre><code>#ifndef PROJ1F_H
  #define PROJ1F_H
  
  typedef struct node {
    char *data;
    struct node *left;
    struct node *right;
  } node;
  
  void insert(char *x, node *top, int count);
  
  void print(node *top, FILE *file, int *count, int index);
  
  #endif
  </code></pre>
  
  <p>functions .c file</p>
  
  <pre><code>#include "proj1f.h"
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;string.h&gt;
  
  void insert(char *x, node *top, int count){
      if(top == NULL){    //place to insert
      node *p = malloc(sizeof(node));
          p -&gt; data = x;
          p -&gt; left = p-&gt; right = NULL;
          top = p;
      count++;
      }
      else if(x == top -&gt; data)
          count++;
      else if(x &lt; top -&gt; data)
          insert(x, top -&gt; left, count);
      else //x &gt; top -&gt; data;
          insert(x, top -&gt;  right, count);
  }
  
  void print(node *top, FILE *file, int *count, int index){
      if(top == NULL)
          fprintf(file, "%s", "no input read in from file");
      else{
          print(top -&gt; left, file, count, index++);
          fprintf(file, "%-17s %d\n", top -&gt; data, count[index]);
        print(top -&gt; right, file, count, index++);
      }
  }
  </code></pre>
  
  <p><code>Main .c</code> file</p>
  
  <pre><code>#include "proj1f.h"
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;string.h&gt;
  
  
  int main(int argc, char *argv[]) {
  int count[300];
  int index = 0;
  int wordInFile = 0;
  node *root = NULL; 
  FILE * readFile = fopen(argv[1], "r");
  
  while(feof(readFile)) {
    char word[30];
    char fword[30];
    fscanf(readFile, "%s", word);
  
    //format word
    int findex = 0;
    int i;
    for(i = 0; i &lt; strlen(word); i++) {
      if(isalnum(word[i])) {
        fword[findex] = word[i];
        findex++;
      } else if(word[i] == NULL) {
        fword[findex] = word[i];
        break;
      }
    }
  
    //insert into tree
    insert(fword, root, count[wordInFile]);
    wordInFile++;
  }
  
  fclose(readFile);
  FILE *writeFile = fopen(argv[2], "w+");
  print(root, writeFile, count, index);
  fclose(writeFile);
  
  return 0;
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>