This is part of a cinema project code that my friend did. I understand most of the other parts, but when I came to this part, I am completely lost.
Can someone please explain this to me line by line please.
Thank You.
If you need the complete code to understand ,I'll upload it....
void Ticketing::ChooseSeat(int NumOfSeat,double sale)
{
char Option[256]={0};
string Input="";
char SeatY[1];
int SeatX;
int FinalSeatY=0;
char CInput[256]={0};
cout << "\nChoose Seat : ";
getline (cin,Input);
for (int i=0;i<Input.size();i++)CInput[i]=Input[i];
cout << "Action('o' for reserved and 'x' for direct payment) : ";
getline (cin,Input);
for (int i=0;i<Input.size();i++)Option[i]=Input[i];
sscanf ( CInput, "%c %d",SeatY , &SeatX);//http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/
SeatY[0]=toupper(SeatY[0]);
Option[0]=toupper(Option[0]);
FinalSeatY = int(SeatY[0]-65);//get integer value of a char to goto array's y index
int temp = NumOfSeat+SeatX;
for (;SeatX<temp;SeatX++)
{
seat[SeatX-1][FinalSeatY] = Option[0];
}
if (Option[0]=='X')UpdateCash(NumOfSeat,sale);
}