You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.5 KiB
65 lines
1.5 KiB
#ifndef __HEAD_H__
|
|
#define __HEAD_H__
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
typedef struct Fligth
|
|
{
|
|
int FligthNum;
|
|
int MaxFare;
|
|
char StartPlace[10];
|
|
char EndPlace[10];
|
|
char StartDate[10];
|
|
char EndDate[10];
|
|
float price;
|
|
int currentFareNum;
|
|
|
|
struct Fligth* prev;
|
|
struct Fligth* next;
|
|
}FlightList;
|
|
|
|
typedef struct Fare
|
|
{
|
|
int FligthNum;
|
|
char IDnumber[16];
|
|
char name[10];
|
|
char gender[2];
|
|
char birthDate[10];
|
|
int SeatNumber;
|
|
|
|
struct Fare* prev;
|
|
struct Fare* next;
|
|
}FareList;
|
|
|
|
int Fligth;
|
|
int FareNum;
|
|
FlightList* FlightHead;
|
|
FareList* FareHead;
|
|
FILE* FligthFp;
|
|
FILE* pareFp;
|
|
|
|
|
|
extern void ReadFligthInfo(void);
|
|
extern void ReadPareInfo(void);
|
|
extern int CopyArrayToNum(char* str, int start, int end);
|
|
extern void CopyArrayToStr(char* str1, char* str2,int start, int end);
|
|
|
|
extern FlightList* FlightMallocFunc(void);
|
|
extern FareList* FareMallocFunc(void);
|
|
extern FlightList* FlightCreateNewNode(void);
|
|
extern FareList* FareCreateNewNode(void);
|
|
extern void FlightInsertNode(FlightList *h_node, FlightList *node, FlightList *n_node);
|
|
extern void FareInsertNode(FareList *h_node, FareList *node, FareList *n_node);
|
|
|
|
extern void ModeFligthMenu(void);
|
|
extern extern void ModeShowAllFligth(void);
|
|
extern void ModeAddFligth(void);
|
|
extern void ModeCancelFligth(void);
|
|
extern void ModeFareMenu(void);
|
|
extern void ModeShowAllFare(void);
|
|
extern void AddFare(void);
|
|
extern void ModeFligthReserve(void);
|
|
|
|
#endif |