Hello guys....I just have some doubt about C programming...well I have done a lot of functions for airline booking system but im not able to implement the multi dimensional array... I dont get how should I implement it in this problem as the variables are global and they are used in different functions. So below is just a part of where i am blur on how to use the multidimensional array...here im trying to use 4 dimensional array and I get a lot of errors in it....Hope you guys can help me out....Thanks
void menu_PurchaseTicket()
{
menu_chooseTicket();//a variable is used to store the input here
menu_ChooseDestination();//a variable is used to store the input here
menu_ChooseTime();//a variable is used to store the input here
menu_ViewSeating();//function showing the seats arrangement in rows and columns(5x5)
menu_ChooseSeat();//a variable is used to store the input here
int seat[cust_TicketClass][cust_Destination][cust_Time][cust_Seat];
int a,b,c,d;
for(a=0;a<2;a++)
{
if(cust_TicketClass == 0)
printf("Business Class");
else
printf("Economy Class");
for(b=0;b<2;b++)
{
if(cust_Destination == 0)
printf("Destination: Kuala Lumpur --> Langkawi\n\n");
else
printf("Destination: Langkawi --> Kuala Lumpur\n\n");
for(c=0;c<5;c++)
{
switch(cust_Time)
{
case '1':
printf("Departure Time: 9.00 a.m\n");
case '2':
printf("Departure Time: 11.00 a.m\n");
case '3':
printf("Departure Time: 1.00 p.m\n");
case '4':
printf("Departure Time: 3.00 p.m\n");
case '5':
printf("Departure Time: 5.00 p.m\n");
default:
printf("Please enter the correct selection\n\n");
for(d=0;d<25;d++)
{
if(cust_Seat>25 || cust_Seat<0)
printf("Invalid Seat Number");
if(cust_Seat>0 || cust_Seat<25)
seat[cust_TicketClass][cust_Destination][cust_Time][cust_Seat]=1;
}
}
}
}
}