- You need to do a forward-declaration of node, since the compiler doesn't know
node yet while it's processing its definition.
- You probably meant to store a pointer, not a node object itself.
Try this:
struct node;
struct node{
struct node *next;
int id;
};