From 664e8f3fd8ae931f93aaa704da3844096fb0d615 Mon Sep 17 00:00:00 2001 From: unknown <1370743524@qq.com> Date: Tue, 8 Jan 2019 10:35:04 +0800 Subject: [PATCH] first commit --- Cpp1.cpp | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Cpp1.cpp diff --git a/Cpp1.cpp b/Cpp1.cpp new file mode 100644 index 0000000..ae6f5a7 --- /dev/null +++ b/Cpp1.cpp @@ -0,0 +1,65 @@ +#ifndef __HEAD_H__ +#define __HEAD_H__ + +#include +#include +#include + +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 \ No newline at end of file