Two dimensional validation and string;

Trying to set a string input into the two-dimensional array and validate the spot taken. I want to print a output a 3 by 3 with the name of the passenger and have a validation while in a for(int). Any suggestions?







string smokingseats[3][3]= { {" o"," o"," o"},//
{" o"," o"," o"},
{" o"," o"," o"}};








getline(cin,one.firstname[u]);




if(smokingseats[one.row[u]][assignseat]=="X"+one.firstname[u])//+one.firstname[u])
{
cout<<"This seat is taken, please choose another column seat. Enter here: ";
cin>>one.column[u];
}
else if(smokingseats[one.row[u]][assignseat]!="X")//+one.firstname[u])
{
smokingseats[one.row[u]][assignseat]="X" +one.firstname[u];
smokecount=smokecount+1;
cout<<"\nThis seat has been assign to this passenger please conintue\n";

}
}
Last edited on
Topic archived. No new replies allowed.