现在有3个结构体变量struct Student、struct Course、struct Attend创建的链表分别储存在3个文件中,文件名分别为stu.dat、course.dat、attend.dat,如何将这3个文件的内容合并储存在1个文件当中,并可以正确从中读取数据,跪求各路大神解答~小弟在此谢过~最好有详细代码。
以下是一些数据:
#define LEN_stu sizeof(struct Student)
#define LEN_course sizeof(struct Course)
#define LEN_attend sizeof(struct Attend)
struct Student
{char name[16];
int age;
struct Student *next;
};
struct Course
{ float credit;
char teacher[16];
struct Course *next;
};
struct Attend
{ char attend[12];
char place[20];
struct Attend *next;
};