#include<>
#include<>
#include<>
struct Node
{
char Identifier[10];
int Num;
char Time[20];
char Gate[10];
char UnitPrice[10];
struct Node* next;
};
struct Node* Initialize()
{
struct Node*p,*q,*head;
head=(struct Node*)malloc(sizeof(struct Node));
FILE* fp;
int m;
char str[60];
fp=fopen("","r+");
head->next=NULL;
while(m!=1)
{
p=(struct Node*)malloc(sizeof(struct Node));
if(p==NULL)
{
printf("Error!\n");
exit(0);
}
printf("Please input the Flight number:\n");
scanf("%s",p->Identifier);
printf("Please input Flight ticket numbers:\n");
scanf("%d",&p->Num);getchar();
printf("Please input Flight time:\n");
scanf("%s",p->Time);
printf("Please input Flight Gate:\n");
scanf("%s",p->Gate);
printf("Please input Flight price:\n");
scanf("%s",p->UnitPrice);
if(head->next==NULL)
{
head->next=p;
}
else
{
q->next=p;
}
q=p;
p->next=NULL;
printf("If want to exit, input 1;else 0:\n");
scanf("%d",&m);getcha
航班订票系统源代码 来自淘豆网www.taodocs.com转载请标明出处.