#include <stdio.h> #include <malloc.h> struct node { int date; struct node *next; }; int main() { struct node a,b,c,*head,*p; a.date=1; b.date=2; c.date=3; head=&a; //head 存a的地址 a.next=&b; b.next=&c; c.next=NULL; p=head; do { printf("%d\n",p->date); //->表示地址指向 p=p->next; }while(p); return 0; }