问题遇到的现象和发生背景
不存在StudentType到DataType的适当转换函数
(插入学生信息的时候出现了问题)
用代码块功能插入代码,请勿粘贴截图
#include<stdio.h>
#define MaxSize 100
typedef struct Student {
long number;
char name[10];
char sxe[3];
int age;
}StudentType;
typedef StudentType DataType;
#include "SepList.h"
void main(void) {
SeqList myList;
int i;
StudentType x[3] = { {2000001,"张三","男",20},
{2000002,"李四","男",21},
{2000003,"王五","女",22}};
StudentType s;
ListInitiate(&myList);//初始化函数的调用
ListInsert(&myList, 0, x[0]);//插入函数调用
ListInsert(&myList, 1, x[1]);
ListInsert(&myList, 2, x[2]);
}
运行结果及报错内容
我的解答思路和尝试过的方法
无
我想要达到的结果
不报错