Before continuing, here is the code that gives me an error:
#define numScores 3
struct btreenode{
int studentID;
float scores[3];
float average;
struct btreenode *left;
struct btreenode *right;
};
typedef struct btreenode *Node;
When compiling, I get the following error:
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
I have a block comment on top, so line numbers are disabled, but
line 17 is the first line " struct btreenode{"
line 28 is the last line " typedef struct btreenode *Node"
Does anyone know why I am getting these errors?
source
share