链表

来源:互联网 发布:闲鱼 淘宝二手官网迈腾 编辑:程序博客网 时间:2024/05/21 06:57
 #include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define STUDENT_ACCOUT 2
typedef struct student{
 char *name;
 char *num;
 struct student *next;
}STUDENT;
STUDENT list_first,list_second;
void create(STUDENT list){
 STUDENT *p_to_struct;
 p_to_struct=list;
 while(p!=NULL){
  s_student.name=(char*)malloc(sizeof(char*));
  scanf("%s",s_student.name);
  printf("input the student Student num:\n");
  s_student[i].num=(char*)malloc(sizeof(char*));
  scanf("%s",s_student[i].num);
 }
}
int main(){
 create(list_first);
 second(list_second);
 
 return 0;
}
原创粉丝点击