Hello all,
I'm having trouble with this section of my code. My program produces an illegal error and then ends before it will call to either of the functions FirstClass or Economy. Can anyone tell me where I might ahve gone wrong with this and how to get it to work? (code below)
Thanks,
Vireyda
Code:void Assign(int A[]) { char seatclass; do { printf("\nWill the passenger be flying first class or economy class?\nFirst class\t- F or f\nEconomy class\t- E or e\n"); fflush(stdin); scanf("%c", seatclass); switch(seatclass) {case 'F':case 'f': FirstClass(A); break; case 'E': case'e': Economy(A); break; default: printf("\nThat is an invalid seat class. Please try again.\n"); }//end switch }while(seatclass!='E'&&seatclass!='e'&&seatclass!='F'&&seatclass!='f');