954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Re: AIRPLANE PROGRAM

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[size] ,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[i]) 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...

MONKEYMAN
Newbie Poster
1 post since Feb 2007
Reputation Points: 9
Solved Threads: 0
 

Give us code what you did, because without any attempt made nobody will help you here

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 
masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You