Please Help with Airplane Reservation Project

Hello everyone,

I'm currently working a project for class and I am stuck. I am a complete newbie when it comes to programming and I am trying my best, so if my code looks off, please let me know where I am going wrong. I'm not looking for anyone to do my homework for me, just would like some help and to be pointed in the right direction. Anyways here are the guidelines for my project:

This program will allow the user to keep track of airline reservations. The program should display the seating chart for the airplane. It will use an * to indicate a seat is taken and the # to indicate the seat is available. The program will also display a menu which provides the user with several options. There will be two types of seats in the airplane: first class and coach, each of which will have a different cost. The program must make use of files, arrays and functions.

The airplane will have 5 rows in the first class section with 4 seats in each row, 2 on each side of the aisle and 10 rows in the coach section with 3 seats on each side of the aisle. The prices for all the first class seats will be the same. The first 5 rows of coach will be more expensive than the last 5 rows. The prices for the seats will be stored in a file called SeatPrices.txt . The program should read these values from the file and store the values in an array of doubles. This is an example of the seating chart:
12 34
Row 1 ## ##
Row 2 ## ##
Row 3 ## ##
Row 4 ## ##
Row 5 ## ##
123 456
Row 6 ### ###
Row 7 ### ###
Etc.

The menu will provide choices to reserve a seat(s) and display the total number of seats sold (indicating first class and coach), the total number of seats empty in a row, the total number of seats empty in the plane (indicating first class and coach), and the total amount of sales (in dollars).

Validation: The seat requested by the user is a valid row and seat number. The program should also make sure the seat is not already taken.

SeatPrices.txt

==============================================================================

I am mainly having problem with my output for the seating chart, I don't know how to get the values of the array to show up as # and *. Can anyone please help me out with this??? Thanks ahead of time!!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
#include <iostream>
#include <iomanip>
#include <fstream>							// allows for the importing of file.
#include <string>

using namespace std;

// Constants

const int FirstCOLS = 4;					// Columns for First class
const int FirstROWS = 5;					// Rows for First class

const int CoachCOLS = 6;					// Columns for Coach class 
const int CoachROWS = 5;					// Rows for Coach class 


//const string Avail = "#";										// Available
//const string Taken = "*";										// Taken

// Function prototypes

void seatChart(double FirstArray[FirstROWS][FirstCOLS], double Coach1Array [CoachROWS][CoachCOLS], 
				double Coach2Array[CoachROWS][CoachCOLS]);

void displayMenu(double, double FirstArray[FirstROWS][FirstCOLS], double Coach1Array[CoachROWS][CoachCOLS],
				double Coach2Array[CoachROWS][CoachCOLS]);

int main()
{
	

	// Variables

	double choice = 0;
	
	const int FIRSTCLASS = 1,
				FIRSTCOACH= 2,
				SECONDCOACH = 3,
				DISPLAYSEAT = 4,
				EXIT = 5;

	//int fcrow, fccol;								// first class rows and columns inputs
	//int fccrow, fcccol;							// first coach class row and columns inputs
	//int scrow, sccol;								// second coach class row and column inputs

	//double seatssold, seatsremainrow, totalsales, totalempty;

	// Arrays

	double FirstArray[FirstROWS][FirstCOLS];
	double Coach1Array[CoachROWS][CoachCOLS];  
	double Coach2Array[CoachROWS][CoachCOLS];  

	// intro

	cout << "Welcome to my Airline Seat Reservation System" << endl;
	cout << "============================================= \n" << endl;

	//seatChart(FirstArray, Coach1Array, Coach2Array);

	displayMenu(choice, FirstArray,Coach1Array,Coach2Array);
	
	return 0;
}
	

// This is a function to display the menu

void displayMenu(double, double FirstArray[FirstROWS][FirstCOLS], double Coach1Array[CoachROWS][CoachCOLS],
	double Coach2Array[CoachROWS][CoachCOLS])
{
	// Variables

	int CHOICE;

	int fcrow, fccol;								// first class rows and columns inputs
	int fccrow, fcccol;								// first coach class row and columns inputs
	int scrow, sccol;								// second coach class row and column inputs

	const int FIRSTCLASS = 1,
			FIRSTCOACH = 2,
			SECONDCOACH = 3,
			DISPLAYSEAT = 4,
			EXIT = 5;

	double firstprice;
	double coach1price;
	double coach2price;

	cout << "Please pick from the following options: 1-5" << endl;
	cout << "======================================" << endl;

	cout << "1.  First Class" << endl;
	cout << "2.  First Coach Class" << endl;
	cout << "3.  Second Coach Class" << endl;
	cout << "4.  Display Available seating" << endl;
	cout << "5.  Exit\n" << endl;
	cin >> CHOICE;

	//Opens input files

	ifstream inputFile;
	inputFile.open("SeatPrices.txt");

	// Checks for failure.

	if (inputFile.fail())
	{
		cout << "Sorry File does not exist or can not be found.\n";
		exit(1);
	}

	// read the numbers and load them into doubles

	inputFile >> firstprice;
	inputFile >> coach1price;
	inputFile >> coach2price;

	// closing file

	inputFile.close();

	// Switch statement

	switch (CHOICE)
	{
	case FIRSTCLASS :
			cout << "You have chosen: First Class" <<  endl;
			cout << "\nThe price of a ticket for First Class is:" << firstprice << endl;
			cout << "\nNow please pick which row you would like to sit in: (1-5) ";
				cin >> fcrow;

				if (fcrow > 5)
				{
					cout << "\nYou have entered an invalid row number, please enter in between 1-5 ";
					cin >> fcrow;
				}

			cout << "\nPlease pick which seat you would like to sit in, please enter between 1-4 ";
				cin >> fccol;

				if (fccol > 4)
				{
					cout << "\nYou have entered an invalid seat number, please enter between 1-4 ";
					cin >> fccol;
				}
			break;

	case FIRSTCOACH:
		cout << "You have chosen: First Coach Class" << endl;
		cout << "\nThe price of a ticket for First Coach Class is $" << coach1price << endl;
		cout << "\nNow please pick which row you would like to sit in: ";
			cin >> fccrow;
		cout << "Please pick which seat you would like to sit in.  Please enter between 6-10: ";
			cin >> fcccol;

		if (fccrow > 10)
		{
			cout << "\nYou have entered an invalid row number, please enter  between 6-10 ";
				cin >> fccrow;
		}

		cout << "\nPlease pick which seat you would like to sit in, please enter between 1-6:  ";
		cin >> fccol;

		if (fcccol > 6)
		{
			cout << "You have entered an invalid seat number, please enter between 1-6";
				cin >> fcccol;
		}
		break;

	case SECONDCOACH:
		cout << "You have chosen: Second Coach Class" << endl;
		cout << "\nThe price of a ticket for Second Coach Class is: $"<< coach2price << endl;
		cout << "\nNow please pick which row you would like to sit in, please choose between 11-15 ";
		cin >> scrow;

		if (fccrow > 15)
		{
			cout << "\nYou have entered an invalid row number, please enter in between 11-15 ";
			cin >> scrow;
		}

		cout << "Please pick which seat you would like to sit in: ";
		cin >> sccol;


		if (fcccol > 6)
		{
			cout << "You have entered an invalid seat number, please enter between 1-6";
			cin >> sccol;
		}
		break;


	case DISPLAYSEAT:

		seatChart(FirstArray, Coach1Array, Coach2Array);
		break;

	case EXIT:

		cout << "You have chosen to Exit the program" << endl;
		cout << "Thank you for using my program, have a good day!" << endl;
		exit(1);
		break;

	default: cout << "You have entered in an invalid choice, please pick between 1-5" << endl;


	}

}

// This is a Funciton for the Seating Chart

void seatChart(double FirstArray[FirstROWS][FirstCOLS], double Coach1Array[CoachROWS][CoachCOLS],
	double Coach2Array[CoachROWS][CoachCOLS])
{
	cout << "This is the Seating Chart" << endl;
	cout << "========================= \n" << endl;


	cout << "First Class is seats 1-4, Rows 1-5\n" << endl;

	for (int a = 0; a < FirstROWS; a++)
	{	
			for (int b = 0; b < FirstCOLS; b++)

               cout << FirstArray[a] << "\t" << FirstArray[b] << endl;
				
		cout << endl;

	}

	cout << "\nFirst Coach Class are seats 1-6, Rows 6-10:" << endl;

	for (int a = 0; a < CoachROWS; a++)
	{
		for (int b = 0; b < CoachCOLS; b++)

			cout << Coach1Array[a] << "\t" << Coach1Array[b] << endl;
	}

	cout << endl;

	cout << "\nSecond Coach Class are seats 1-6, Rows 11-15" << endl;

	for (int a = 0; a < CoachROWS; a++)
	{
		for (int b = 0; b < CoachCOLS; b++)

			cout << Coach2Array[a] << "\t" << Coach2Array[b] << endl;
	}

	cout << endl;

}
Last edited on
I am mainly having problem with my output for the seating chart, I don't know how to get the values of the array to show up as # and *. Can anyone please help me out with this???

I would recommend a for loop. Like this:

1
2
3
	for (int x = 0; x < FirstROWS; x++)
	     for (int y = 0; y < FirstCOLS; y++)
		firstClassSeats[x][y] = '#';


Then another for loop like it for the Coach.

To convert the '#' to '*', I would recommend to use an if/else statement. Like this:


Once you select the row and the seat, you can use the if/else statement:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
	
                       	cout << "What Row would you like to reserve?";
			cin >> rowFirstClass;

			cout << "What Seat would you like to reserve?";
			cin >> seatFirstClass;

		        if (firstClassSeats[rowFirstClass - 1][seatFirstClass - 1] != '*')
			{

				firstClassSeats[rowFirstClass - 1][seatFirstClass - 1] = '*';
				cout << endl << "======RESERVED======\n";
				countFirst++;
			}

			else
			{
				cout << "======SEAT IS OCCUPIED======" << endl;
			}


I hope it helps.
Thanks Chicofeo.

I added the code for the #, but now I'm getting a an error:

C2065 : 'y' undeclared identifier

here is what the code looks like:

1
2
3
4
5
6
7
8
9
10
11
12
13

for (int x=0; x < FirstROWS; x++)
{
     for (int y = 0; y < FirstCOLS; y++)

        FirstArray [x][y] = '#';

cout << FirstArray [x][y] << endl;

cout << endl;

}


not sure where I am going wrong here.
The y is undeclared, because of line 8
cout << FirstArray [x][y] << endl;

The 'y' variable is initialized only for the loop on line 4 and line 6:
1
2
 for (int y = 0; y < FirstCOLS; y++)
   FirstArray [x][y] = '#';


However, if you want to use line 8, then you would have to add the enclosing brackets like this:
1
2
3
4
5
     for (int y = 0; y < FirstCOLS; y++)
     {
        FirstArray [x][y] = '#';
        cout << FirstArray [x][y] << endl;
     }


The error C2065 : 'y' undeclared identifier should disappear.

Thanks again so much Chicofeo.

I was able to fix it, but it still does not output the #, is there something else I am missing here?

here is a full line of code to hopefully output it...

1
2
3
4
5
6
7
8
9
10

for (int x = 0; x < CoachROWS; x++)
{
     for (int y = 0; y < CoachCOLS; y++)
    {
     Coach1Array[x][y] = '#';
     cout << Coach2Array[x][y];
     }
}

Last edited on
if you want, could you post the updated code?
Sure here is the complete program...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
#include <iostream>
#include <iomanip>
#include <fstream>							// allows for the importing of file.
#include <string>

using namespace std;

// Constants

const int FirstCOLS = 4;					// Columns for First class
const int FirstROWS = 5;					// Rows for First class

const int CoachCOLS = 6;					// Columns for Coach class 
const int CoachROWS = 5;					// Rows for Coach class 


//const string Avail = "#";										// Available
//const string Taken = "*";										// Taken

// Function prototypes

void seatChart(double FirstArray[FirstROWS][FirstCOLS], double Coach1Array [CoachROWS][CoachCOLS], 
				double Coach2Array[CoachROWS][CoachCOLS]);

void displayMenu(double, double FirstArray[FirstROWS][FirstCOLS], double Coach1Array[CoachROWS][CoachCOLS],
				double Coach2Array[CoachROWS][CoachCOLS]);

int main()
{
	

	// Variables

	double choice = 0;
	
	const int FIRSTCLASS = 1,
				FIRSTCOACH= 2,
				SECONDCOACH = 3,
				DISPLAYSEAT = 4,
				EXIT = 5;

	//int fcrow, fccol;								// first class rows and columns inputs
	//int fccrow, fcccol;							// first coach class row and columns inputs
	//int scrow, sccol;								// second coach class row and column inputs

	//double seatssold, seatsremainrow, totalsales, totalempty;

	// Arrays

	double FirstArray[FirstROWS][FirstCOLS];
	double Coach1Array[CoachROWS][CoachCOLS];  
	double Coach2Array[CoachROWS][CoachCOLS];  

	// intro

	cout << "Welcome to my Airline Seat Reservation System" << endl;
	cout << "============================================= \n" << endl;

	//seatChart(FirstArray, Coach1Array, Coach2Array);

	displayMenu(choice, FirstArray,Coach1Array,Coach2Array);
	
	return 0;
}
	

// This is a function to display the menu

void displayMenu(double, double FirstArray[FirstROWS][FirstCOLS], double Coach1Array[CoachROWS][CoachCOLS],
	double Coach2Array[CoachROWS][CoachCOLS])
{
	// Variables

	int CHOICE;

	int fcrow, fccol;								// first class rows and columns inputs
	int fccrow, fcccol;								// first coach class row and columns inputs
	int scrow, sccol;								// second coach class row and column inputs
	double countFirst = 0, countFirstCoach = 0, countSecondCoach = 0;								// stores how many tickets bought

	const int FIRSTCLASS = 1,
			FIRSTCOACH = 2,
			SECONDCOACH = 3,
			DISPLAYSEAT = 4,
			EXIT = 5;

	double firstprice;
	double coach1price;
	double coach2price;

	cout << "Please pick from the following options: 1-5" << endl;
	cout << "======================================" << endl;

	cout << "1.  First Class" << endl;
	cout << "2.  First Coach Class" << endl;
	cout << "3.  Second Coach Class" << endl;
	cout << "4.  Display Available seating" << endl;
	cout << "5.  Exit\n" << endl;
	cin >> CHOICE;

	//Opens input files

	ifstream inputFile;
	inputFile.open("SeatPrices.txt");

	// Checks for failure.

	if (inputFile.fail())
	{
		cout << "Sorry File does not exist or can not be found.\n";
		exit(1);
	}

	// read the numbers and load them into doubles

	inputFile >> firstprice;
	inputFile >> coach1price;
	inputFile >> coach2price;

	// closing file

	inputFile.close();

	// Switch statement

	switch (CHOICE)
	{
	case FIRSTCLASS :
			cout << "You have chosen: First Class" <<  endl;
			cout << "\nThe price of a ticket for First Class is:" << firstprice << endl;
			cout << "\nNow please pick which row you would like to sit in: (1-5) ";
				cin >> fcrow;

				if (fcrow > 5)
				{
					cout << "\nYou have entered an invalid row number, please enter in between 1-5 ";
					cin >> fcrow;
				}

			cout << "\nPlease pick which seat you would like to sit in, please enter between 1-4 ";
				cin >> fccol;

				if (fccol > 4)
				{
					cout << "\nYou have entered an invalid seat number, please enter between 1-4 ";
					cin >> fccol;
				}


				if (FirstArray[FirstROWS - 1][FirstCOLS - 1] != '*')
				{

					FirstArray[FirstROWS - 1][FirstCOLS - 1] = '*';
					cout << endl << "Your seat has been reserved\n";
					countFirst++;

				}

				else {
					cout << "I'm sorry the seat is occupied" << endl;
				}
			break;

	case FIRSTCOACH:
		cout << "You have chosen: First Coach Class" << endl;
		cout << "\nThe price of a ticket for First Coach Class is $" << coach1price << endl;
		cout << "\nNow please pick which row you would like to sit in: ";
			cin >> fccrow;
		cout << "Please pick which seat you would like to sit in.  Please enter between 6-10: ";
			cin >> fcccol;

		if (fccrow > 10)
		{
			cout << "\nYou have entered an invalid row number, please enter  between 6-10 ";
				cin >> fccrow;
		}

		cout << "\nPlease pick which seat you would like to sit in, please enter between 1-6:  ";
		cin >> fccol;

		if (fcccol > 6)
		{
			cout << "You have entered an invalid seat number, please enter between 1-6";
				cin >> fcccol;
		}

		if (Coach1Array[CoachROWS - 1][CoachCOLS - 1] != '*')
		{

			Coach1Array[CoachROWS - 1][CoachCOLS - 1] = '*';
			cout << endl << "Your seat has been reserved\n";
			countFirstCoach++;

		}

		else {
			cout << "I'm sorry the seat is occupied" << endl;
		}

		break;

	case SECONDCOACH:
		cout << "You have chosen: Second Coach Class" << endl;
		cout << "\nThe price of a ticket for Second Coach Class is: $"<< coach2price << endl;
		cout << "\nNow please pick which row you would like to sit in, please choose between 11-15 ";
		cin >> scrow;



		if (fccrow > 15)
		{
			cout << "\nYou have entered an invalid row number, please enter in between 11-15 ";
			cin >> scrow;
		}

		cout << "Please pick which seat you would like to sit in: ";
		cin >> sccol;


		if (fcccol > 6)
		{
			cout << "You have entered an invalid seat number, please enter between 1-6";
			cin >> sccol;
		}

		if (Coach2Array[CoachROWS - 1][CoachCOLS - 1] != '*')
		{

			Coach2Array[CoachROWS - 1][CoachCOLS - 1] = '*';
			cout << endl << "Your seat has been reserved\n";
			countSecondCoach++;

		}

		else {
			cout << "I'm sorry the seat is occupied" << endl;
		}
		break;


	case DISPLAYSEAT:

		seatChart(FirstArray, Coach1Array, Coach2Array);
		break;

	case EXIT:

		cout << "You have chosen to Exit the program" << endl;
		cout << "Thank you for using my program, have a good day!" << endl;
		exit(1);
		break;

	default: cout << "You have entered in an invalid choice, please pick between 1-5" << endl;


	}

}

// This is a Funciton for the Seating Chart

void seatChart(double FirstArray[FirstROWS][FirstCOLS], double Coach1Array[CoachROWS][CoachCOLS],
	double Coach2Array[CoachROWS][CoachCOLS])
{
	cout << "This is the Seating Chart" << endl;
	cout << "========================= \n" << endl;


	cout << "First Class is seats 1-4, Rows 1-5\n" << endl;
	
	for (int x = 0; x < FirstROWS; x++)
	{	
		for (int y = 0; y < FirstCOLS; y++)
		{
			FirstArray[x][y] = '#';
			cout << FirstArray[x][y];
		}
		cout << endl;

	}

	cout << "\nFirst Coach Class are seats 1-6, Rows 6-10:\n" << endl;

	for (int x = 0; x < CoachROWS; x++)
	{
		for (int y = 0; y < CoachCOLS; y++)
		{
			Coach1Array[x][y] = '#';
			cout << Coach1Array[x][y];
		}
	}

	cout << endl;

	cout << "\nSecond Coach Class are seats 1-6, Rows 11-15\n" << endl;

	for (int x = 0; x < CoachROWS; x++)
	{
		for (int y = 0; y < CoachCOLS; y++)
		{
			Coach1Array[x][y] = '#';

			cout << Coach2Array[x][y];
		}
	}

	cout << endl;

}
Take a look at line 50:

1
2
3
	double FirstArray[FirstROWS][FirstCOLS];
	double Coach1Array[CoachROWS][CoachCOLS];  
	double Coach2Array[CoachROWS][CoachCOLS];  


you should change it from double to char. You are using the array variables to allocate the character '#' to display the available seats and '*' for occupied seats. If you don't change it, then you will get random numbers or garbage.

For example:
1
2
3
4
5
6
7
	char FirstArray[FirstROWS][FirstCOLS];
	double Coach1Array[CoachROWS][CoachCOLS];
	double Coach2Array[CoachROWS][CoachCOLS];

	for (int x = 0; x < FirstROWS; x++)
		for (int y = 0; y < FirstCOLS; y++)
			FirstArray[x][y] = '#';


I did not change it all to give you the opportunity to work on it.

Take a look at lines 178-185

1
2
3
4
5
6
7
8
cout << "\nPlease pick which seat you would like to sit in, please enter between 1-6:  ";
cin >> fccol;

if (fcccol > 6) // Do you notice the difference between fccol and fcccol?
{
	cout << "You have entered an invalid seat number, please enter between 1-6";
	cin >> fcccol; // Is it fccol or fcccol?
}


Take a look at lines 205-214:

1
2
3
4
5
6
7
8
9
10
11
cout << "\nNow please pick which row you would like to sit in, please choose between 11-15 ";
cin >> scrow; 



if (fccrow > 15) // This variable is not initiated. Do you mean scrow?
{
	cout << "\nYou have entered an invalid row number, please enter in between 11-15 ";
	cin >> scrow; // You will get a run time error prior to arriving here that fccrow is not
	//initiated.
}



Take a look at the function :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
void seatChart(char FirstArray[FirstROWS][FirstCOLS], double Coach1Array[CoachROWS][CoachCOLS],
	double Coach2Array[CoachROWS][CoachCOLS])
{
	cout << "This is the Seating Chart" << endl;
	cout << "========================= \n" << endl;

	cout << "# - Available Seats\n";
	cout << "* - Occupied seats\n";
	cout << "Available Seats for you are :\n";
	cout << "       1 2 3 4\n";
	for (int x = 0; x < FirstROWS; x++)
	{
		cout << right << setw(2) << "Row " << setw(2) << x + 1; // Use setw to adjust the spacing between characters, accordingly
		for (int y = 0; y < FirstCOLS; y++)
			cout << setw(2) << FirstArray[x][y];

		cout << endl;
	}

	//cout << "First Class is seats 1-4, Rows 1-5\n" << endl;

	//for (int x = 0; x < FirstROWS; x++)
	//{
	//	for (int y = 0; y < FirstCOLS; y++)
	//	{
	//		FirstArray[x][y] = '#';
	//		cout << FirstArray[x][y];
	//	}
	//	cout << endl;

	//}

	cout << "\nFirst Coach Class are seats 1-6, Rows 6-10:\n" << endl;

	for (int x = 0; x < CoachROWS; x++)
	{
		for (int y = 0; y < CoachCOLS; y++)
		{
			Coach1Array[x][y] = '#';
			cout << Coach1Array[x][y];
		}
	}

	cout << endl;

	cout << "\nSecond Coach Class are seats 1-6, Rows 11-15\n" << endl;

	for (int x = 0; x < CoachROWS; x++)
	{
		for (int y = 0; y < CoachCOLS; y++)
		{
			Coach1Array[x][y] = '#';

			cout << Coach2Array[x][y];
		}
	}

	cout << endl;

}


I made some suggestions to give you an idea to work on it.
Thank you so much Chicofeo! I'll work on everything you helped me with and if there is anything else I'll let you know.
Topic archived. No new replies allowed.