You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cout << "\n-- Passenger Have Ticket Already! --" << endl;
ShowTicket(fullName);
}
else
{
cout << "\nSorry, Passenger don't have Ticket\n\n\n";
}
break;
}
casee4:
{
string fullName = GiveFullName();
RefundTicket(fullName);
break;
}
casee5:
{
cout << "\n-- GOOD LUCK --";
state = false;
break;
}
case other:
{
cout << "\n-- Invalid Number! Please Try again --\n\n\n";
break;
}
}
}
return0;
}
in switch case statement, don't worry about e1, e2 ,e3, ... and so on.
when we use normally 1, 2, 3, ...
and client is type like 53 get stuck at a infinite loop and crash
even though we use default: key word on last case,
so, we need two use something different for this issue
use enum!
and translate elements to numbers like this:
main function
RailwayCli/main.cpp
Lines 283 to 345 in 021ebb1
in switch case statement, don't worry about
e1, e2 ,e3, ...
and so on.when we use normally
1, 2, 3, ...
and client is type like
53
get stuck at a infinite loop and crasheven though we use
default:
key word on last case,so, we need two use something different for this issue
use
enum
!and translate elements to numbers like this:
RailwayCli/main.cpp
Lines 263 to 281 in 021ebb1
The text was updated successfully, but these errors were encountered: