when I try to compile I get this message. In function `int main(int, char**)':
line 23 `Seats' undeclared (first use this function)
Each undeclared identifier is reported only once for each function it appears in.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#include <iostream>
#include <limits>
using namespace std;
int main(int argc, char* argv[]) {
int A, B, C;
std::cout << "Seats sold in section A: ";
std::cin >> A;
std::cout << "Seats sold in section B: ";
std::cin >> B;
std::cout << "Seats sold in section C: ";
std::cin >> C;
std::cout << "Total sales: " << A*20 + B*15 + C*10;
std::cout << "Press ENTER to exit.\n";
std::cin.get(Seats in Theater(), '\n');
return 0;
}
|
Last edited on
Where is this Seats in Theater()
function defined?
it is supposed to be the total number of seats in the theater.
It doesn't seem to be defined (at least in the code you've posted), so the compiler won't know what it is.
line 23 `Seats' undeclared