gcc
lovingly throws me this error:
bst.c:33: error: invalid application of ‘sizeof’ to incomplete type ‘struct BSTNode’
What makes BSTnode incomplete? Below are the struct definitions relevant to BSTnode.
struct BSTnode{
struct BSTnode * left;
struct BSTnode * right;
struct hash minhash;
struct hash maxhash;
struct DHTid owner;
int misses;
};
where we have:
struct hash{
int hash;
};
struct DHTid
{
int islocal;
unsigned long addr;
unsigned short port;
struct DHTnode * node;
};
and currently:
struct DHTnode{
int something;
};
EDIT: My actual code has the following structure:
struct DHTnode{...};
struct hash{...};
struct DHTid{...}; /*changed . to ; in pseudocode*/
struct BSTnode{...};
EDIT: user318466 pointed a missing semicolon, but there was still more wrong with it.