文档介绍:程序流程图
1、creat( );//创建链表
airticket *ps
ps->num!=0
head=NULL
head=ps
pEnd->next=ps
pEnd=ps
pEnd->next=NULL
2、save( );//保存文档
fwrite(head1,sizeof(airticket,1,fp);
head1=head->next
fclose(fp);
(fp=fopen(“”)
return;
head1
3、tuipiao( );//退票
airticket*tail,*temp=newairticket
(fp=fopen(“”,“b”)
cout<<“出错,检查文件是否存在
(fread(temp,sizeoof
head=NULL
temp->next=NULL:
head=tail=temp;head->next
temp=newairticket;
fclose(fp);
!head
cout<<“数据为空”<<endl;
temp=tail=head;
FOR
fclose(fp);
4、watch( );//查看航班信息
airticket*tail,*temp=newairticket;
cout<<endl;
temp->next=NULL;
head=tail=temp;head->next
cout<<“出错,请检查文件是否存在
fp=fopen(“”)
(fread(temp,sizeof(s
head=NULL
OJ
]是虽早
deletetail,temp;
5、search_num( );//按航班号查询
int num;
Fp(fopen(“”)
cout<<“出错,检查文件是否存在
(fread(temp,sizeof
head=NULL
Temp->next=NULL;
head=tail=temp;head->next
temp=newairticket;
cout<<“请输入查找的信息”
IF
head
IF
head=head->next
deletetail,temp
IF
6、search_day( );//按日期查询
int day,m;
(fp=fopen(“”
cout<<“出错,检查文件是否存在
(fread(tmep,sizeo
IF
tmep=newairticket;
cout<<“请输入所要查找的信息
IF
head
IF