#include"stdio.h" #include"stdlib.h" typedef struct node { int data; struct node *next; }node,*NODE; main() { node *head; head=(NODE)malloc(sizeof(node)); head->next=NULL; head->data=1; while(head->data) { scanf("%d",&head->data);
head=head->next; }
}//運行沒錯但在輸入數據之後就會出錯,是不是鏈的結構有問題???