我正在编译这段代码,但出现编译错误,提示“取消引用指向不完整类型的指针”。我得到了最后一个打印语句的错误,在此之前我尝试指向 (*temp)。num 到 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\n",temp->num, x.next->num);
}