-1

I am new to c++, and i have a program to do as follows:
1) fill a 2D array for the seat chart with * ... DONE
2) add a passenger to the plane
I am stuck here, i have the info put into the cin statements etc, but how do i make it so that it makes an 'X' in the seat that they want to sit in ?????
3) sort the list of passengers added
I have written a selection sort as follow: (can anyone tell me why it will not compile with code?
//prototype: void print_list(pass_rec passlist ,int );
//function call: print_list(passlist,count);
void print_list(pass_rec passlist,int count)
{
int min_loc=0;
pass_rec temp;
for(int pass=1; pass < count; pass++)
{
min_loc = pass-1;
for(int i = pass; i < count; i++)
{
if(passlist[min_loc] > passlist)
min_loc = i;
}
if(min_loc != pass-1)
{
temp.lname = passlist[min_loc].lname;
passlist[min_loc] = passlist[pass-1];
passlist[pass-1] = temp;
}
cout << passlist[min_loc] << endl;
}
system("pause");
}

PLEASE ANYONE HELP

I have to make basicly the same program but in java. i have no idea how to make it. so if anyone could do it for me that would be awesome. i cant figure out how to use the 2D array.. im so confused...

Votes + Comments
Go on, have a guess how many forum rules you've broken.
3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by masijade
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.