Question: /******************************************************************************* * List header files - do NOT use any other header files. Note that stdlib.h is * included in case you want to use

/******************************************************************************* * List header files - do NOT use any other header files. Note that stdlib.h is * included in case you want to use any of the functions in there. However the * task can be achieved with stdio.h and string.h only. *******************************************************************************/ #include #include #include /******************************************************************************* * List preprocessing directives - you may define your own. *******************************************************************************/ #define MAX_FLIGHTCODE_LEN 6 #define MAX_CITYCODE_LEN 3 #define MAX_NUM_FLIGHTS 5 #define DB_NAME "database" /******************************************************************************* * List structs - you may define struct date_time and struct flight only. Each * struct definition should have only the fields mentioned in the assignment * description. *******************************************************************************/ struct date_time { int month; int day; int hour; int minute; }; typedef struct date_time date_time_t; struct flight { char flightcode[MAX_FLIGHTCODE_LEN +1]; date_time_t departure_dt; char arrival_city[MAX_CITYCODE_LEN +1]; date_time_t arrival_t; }; typedef struct flight flight_t; int size =0; /******************************************************************************* * Function prototypes - do NOT change the given prototypes. However you may * define your own functions if required. *******************************************************************************/ void print_menu (void); void option(int i,int size,flight_t flights[MAX_NUM_FLIGHTS]) void addflights(int i,flight_flights[MAX_NUM_FLIGHTS]); void displayflights(int i,flight_flights[MAX_NUM_FLIGHTS]); void saveflightssavetodabase(flight_t flights[]); void loadflightsfromdatabase(flight_t flights[]); /******************************************************************************* * Main *******************************************************************************/ int main(void) { /* TODO */ int i =0; flight_t flights[MAX_NUM_FLIGHTS]; int optionnumber; char option2[MAX_FLIGHTCODE_LEN]; flight_t flights[MAX_NUM_FLIGHTS]; while(1) { print_menu(); scanf("%d",&optionnumber); option(optionnumber); } return 0; } thats my code, i could not compilec, can someone fix it for me?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!