回复 4楼 云团
#include<stdio.h>#include<stdlib.h>
struct date{
int date;
struct date*next;
};
int main()
{
struct date*head=NULL;
struct date*p1;
//struct date*p;
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
p1=(struct date*)malloc(sizeof(struct date));
scanf("%d",&p1->date);
p1->next=head;//这两句怎么理解啊
head=p1;//
}
p1=head;
while(p1!=NULL)
{
printf("%d ",p1->date);
p1=p1->next;
}
}