I am compiling this piece of code and I get compilation errors saying " dereferencing pointer to incomplete type" . I get the errors for the last print statement and before that where I try to point (*temp). num to the address of b
void main()
{
struct {
int xx;
char *y;
int * num;
struct x *next;
}x;
struct x* temp;
int b = 10;
temp = ((struct x *)malloc(sizeof(x)));
(*temp).num = &b;
x.next = temp ;
printf(" %d
",temp->num, x.next->num);
}