我加了这个还是不行_CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include"ColossusAirlines.h"
#define _CRT_SECURE_NO_WARNINGS
int main(void)
{
while (1)
{
getchar();
InitSeatTable();
PrintMenu();
char option = getchar();
switch (option)
{
case 'a':
EmptySeat();
break;
case 'b':
PrintSeatList();
break;
case 'c':
SeatList();
break;
case 'd':
printf("please choose a seat\n");
char seatID[IDleng];
scanf("%s", seatID);
printf("please enter your first name:\n");
char FirsName[FirNameLeng];
scanf("%s", FirsName);
printf("please enter your last name:\n");
char LastName[LasNameLeng];
scanf("%s", LastName);
int ret = AssignSeat(seatID, FirsName, LastName);
if (ret == 1)
{
printf("Assigned success\n");
}
else if (ret == -2)
{
printf("Assigned failed seat id no exist\n");
}
else if (ret == -1)
{
printf("this seat have assigned! please choose another seat\n");
}
break;
case 'e':
break;
case 'f':
break;
default:
printf("wrong command.\n");
}
return 0;
}
}