title: C, "conflicting types for... " error
body: <p>Before I continue, here is the code which is giving me an error:</p>
  
  <pre><code>#define numScores 3             // the number of test scores which a student will have
  
  struct btreenode{
  int studentID;              // the ID number of the student at the current node
  
  float scores[3];            // the 3 test scores of the student
  
  float average;              // the average of the 3 test scores for the student
  
  struct btreenode *left;     // pointer to left side of the tree
  struct btreenode *right;    // pointer to right side of the tree
  };
  
  typedef struct btreenode *Node;
  </code></pre>
  
  <p>I'm getting the following error when I compile:</p>
  
  <pre><code>btreenode.h:17: error: redefinition of 'struct btreenode'
  btreenode.h:28: error: conflicting types for 'Node'
  btreenode.h:28: note: previous declaration of 'Node' was here
  </code></pre>
  
  <p>I have a block comment at the top so the line numbers are off, but</p>
  
  <p>line 17 is the first line "<code>struct btreenode{</code>"</p>
  
  <p>line 28 is the last line "<code>typedef struct btreenode *Node</code>"</p>
  
  <p>Does anyone know why i'm getting these errors?</p>