关于链表空间申请释放问题
程序代码:void Append_newClerk_info()
{
readToLink();//文件数据读入链表,函数里面已经包括打开文件,申请空间,关闭文件等步骤
struct clerk* pc=head;
char c;
if(pc->next==NULL)//如果原链表为空表
{
printf("Please input the clerk's ID/tname/tage/tposition/tsalary: \n ");
printf("ID :");scanf("%s",&pc->ID);
printf("name :");scanf("%s",&pc->name);
printf("age :");scanf("%s",&pc->age);
printf("position:");scanf("%s",&pc->position);
printf("salary :");scanf("%6.2lf",&pc->salaries);
printf("Are they righ?(Y/N)\n");
if(judge())//judge是一个已测试的判断函数
choose_1();
else
Append_newClerk_info(); ///////这句返回去重头执行的话要不要先释放链表空间,因为第一 //次已经申请过一次
//还有就是怎样通过链表把文件内数据全部删除?
//
}






