C&M Airlines (Charlie and Mable) operates a small commuter airline with a single plane
that seats 12 passengers. The plane makes one flight per day. Write a seating reservation
program as described.
The passenger information is stored in an array of 12 structures. This array should be
maintained in the main() function. Each structure holds the seat ID, a marker that
indicates if the seat has been assigned, a passenger first name and a passenger last name.
__________________________________________________ __
(this is what i have, but im completely stomped. Please help)
#include "stdafx.h"
#include <string.h>
void menu();
void showEmptySeats();
int _tmain(int argc, _TCHAR* argv[])
{
typedef struct
{
char firstname[21];
char lastname[20];
int id;
int taken;
} info;
info airplane[12];
menu();
return 0;
}
void menu()
{
char choice[10];
printf("a.) Show number of empty seats\nb.) Show list of empty seats\nc.) Assign a seat\nd.) Delete a seat assignment\ne.) Quit\n\nPlease choose an option: ");
scanf("%s", choice);
/* Execute function */
if(strcmp("a",choice)==0) showEmptySeats();
else if(strcmp("b",choice)==0) printf ("b");
else if(strcmp("c",choice)==0) printf ("c");
else if(strcmp("d",choice)==0) printf ("d");
else if(strcmp("e",choice)==0) printf ("e");
}
void showEmptySeats()
{
};