Airplane seating program

I am need to write a program that seats people in an airplane. There is 7 rows with four seats each labeled A B C D. It need to ask the user what row and seat they want to sit in(1b, 6d, etc). Then it puts an X on that seat and updates it and displays it on the screen. If the user inputs a seat that has already been taken then it will say choose a different seat. This goes until all seats are filled or the user ends the program.
I think I have everything done correctly so far but when it updates, it doesnt show the X. What am I doing wrong? Please help me with any problems you see. Code suggestions would be nice but any help would be great

Here is my code so far:

#include <iostream>
#include <string>
using namespace std;
class seating
{
char seats[7][4];
public:
char choice[2];
seating()
{
for(int i=0;i<7;i++)
{
seats [i][0]='A';
seats [i][1]='B';
seats [i][2]='C';
seats [i][3]='D';
}
}

void getchoice()
{
cout << endl << "Please enter the seat to reserve (enter x to exit): ";
cin >> choice;
}
void updateseats()
{
int row, seat;
bool goodseat;
}
void showseats()
{
cout<<endl;
for(int i=0;i<7;i++)
{
cout<<i+1<<" ";
cout<<seats [i][0]<<" ";
cout<<seats [i][1]<<" ";
cout<<seats [i][2]<<" ";
cout<<seats [i][3];
cout<<endl;
}
}
};

int main()
{
seating s;
s.showseats();
s.getchoice();
while(s.choice[0]!='x')
{
s.updateseats();
s.showseats();
s.getchoice();
}
cout<<endl<<"Thank you and good bye.";
cout<<endl<<endl;
system ("pause");
return 0;
}
You have not written any code that would accommodate any of the changes that you actually need to make while users are inputting seats...
Yeah that i am aware of but im just not sure how. How can I take the seat that the user enters and apply that to the array and put an X there. I know i can use a bunch of if statements but is there an easier way? Thanks for your help
Topic archived. No new replies allowed.