Need help with a C++ Program

I have been trying to work on this project for a day now and I am stuck on what to do. The problem I am trying to solve is this: In preparation for the release of Avengers 4 next summer, you have been hired by the owner of a very small movie theater to develop the backend for an online ticket reservation system. The program should display the current seating arrangement and allow the patron to select seats. A report should be generated at the end of the program to specify for each individual auditorium and overall for all auditoriums how many seats were sold/unsold and how much money was earned.

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
int main() {
	do {
		mainMenu();
		Row(1);
		
	} while(mainMenu() == '1');

	return 0;
}

int mainMenu() {
	int select = 0;
	do {
		cout << "1. Reserve Seats" << endl;
		cout << "2. Exit" << endl;

		cin >> select;
		cin.ignore(INT_MAX, '\n');
	} while(select != 1 || select != 2);

	return 1;
}

int Row(int mainMenu()) {
	int row;
	while(row > 0) {

		cout << "How many rows are in the auditorium?" << endl;
		cin >> row;
		cin.ignore(INT_MAX, '\n');
	}

	return row;

}

//int Adult() {
//
//}
//int Child() {
//
//}
//int Senior() {
//
//}
//int check() {
//
//}
//float money() {
//	
//}
//void displayReport() {
//	cout << "Total Seats in the Auditorium: " << endl;
//	cout << "Total Seats Sold: " << endl;
//	cout << "Adult Tickets Sold: " << endl;
//	cout << "Child Tickets Sold: " << endl;
//	cout << "Senior Tickets Sold: " << endl;
//	cout << "Total Tickets Sales: $" << endl;
//}] 
Last edited on
What is the exact problem you are having at the moment?
@ OP, a simple google search "Theater Seating C++" would show you examples.
You need #include s for required headers.

If you're going to place your functions after main, you need function prototypes.

Your problem description indicates there are multiple auditoriums. There is no indication of this in your program.

You need some kind of array to keep track of the status of seats in each auditorium.

You ask for the number of rows, but there is no indication in your program of the number of seats per row.

Lines 3,6: You're calling mainmenu() twice for each iteration of the loop.

Line 17: You have no code to act on what the use entered.

Line 19: Your logic is flawed. Your while condition is always going to be true regardless of what was entered.

Line 24: What kind of syntax is this? You can't pass a function declaration as an argument.

Line 25-26: row is an uninitialized variable. You're going to be comparing garbage.
Topic archived. No new replies allowed.