hi guys, trying to figure out how to put X when seat is taken plz help
[//Airplane Seat Assigning system.
#include<iostream>
using namespace std;
int main()
{
char seat [7][4]={}; //initalize 7 rows and 4 columns
char arr[4]={'a','b','c','d'};
int i,j;
int row, colnum;
char col;
for(i=1;i<=7;i++)
{
for(j=1;j<=4;j++)
{
//cout<<seat[i+1][j+1];
seat[i-1][j-1]=arr[j-1];
cout<<arr[j-1];
}
cout<<endl;
}
int x;
while(true){
cout<<"Row number :"<<endl;
cin>>row;
cout<<"Column: "<<endl;
cin>>col;
cout<< seat[row-1][col-1]<<"\n";
if(seat[row-1][col-1]=='X')
{
cout<<"\tSeat has been taken"<<endl;
continue;
system("CLS");
//switch()
//case 1:
}
seat[row-1][col-1]='X';
for(i=1;i<=7;i++)
{
for(j=1;j<=4;j++)
{
cout<<seat[i-1][j-1];
}
cout<<endl;
}
}
system("CLS");
system("pause");
return 0;
}
]