无名1234533
无名1234533
关注数: 0
粉丝数: 11
发帖数: 57
关注贴吧数: 12
新手求指教 写好的代码 不知道那写错了 #include<stdio.h> #include<stdlib.h> #define N 32 typedef struct lian { int id ; char name[N]; struct lian *next ; }LIST; LIST * creat(); void print(LIST *head); int n; main() { LIST * head; head=creat(); print(head); } LIST * creat() { LIST *head; LIST *newlist; newlist =(LIST *)malloc(sizeof(LIST)); printf("id"); scanf("%d",&newlist->id); printf("name"); scanf("%s",&newlist->name); printf("\n\n"); n =0; head = NULL; head = newlist; while(newlist->id != 0) { n++; newlist->next=newlist; newlist =(LIST *)malloc(sizeof(LIST)); printf("id"); scanf("%d",&newlist->id); printf("name"); scanf("%s",&newlist->name); printf("\n\n"); } return head; } void print(LIST *head) { LIST *p; printf("有%d条数据\n",n); p=head; while(p != NULL) { printf("%d %s\n",p->id,p->name); p = p->next; }; }
怎么猴子攻击操作是不是不能按朝向攻击 求解答
本人新手 求介绍个编译器
. 我最喜欢这个系统,容易刷分什么的,有15字了吧
1
下一页