Parse Error causing trouble
Posted: Sun Sep 28, 2003 9:29 pm
Hi.. for some reason im getting a parse error for this section:
#include <iostream>
using namespace std;
int main()
{
const int MAXIMUM = 30;//people
int num_people;
cout << "Enter the amount of people attending the meeting: ";
cin >> num_people;
{
cout << "The meeting cannot be held as planned due to fire regulations.\n";
cout << "Please exclude" << (num_people > MAXIMUM) << "people.\n";
}
else
{
cout << "It is legal to hold the meeting.\n";
cout << "An additional" << (MAXIMUM - num_people) << "people may attend the meeting.\n";
}
return 0;
}
im getting the errors before 'else' and 'return' aslso it is saying something is wrong with 'int main()'
PLEASE HELP!!
#include <iostream>
using namespace std;
int main()
{
const int MAXIMUM = 30;//people
int num_people;
cout << "Enter the amount of people attending the meeting: ";
cin >> num_people;
{
cout << "The meeting cannot be held as planned due to fire regulations.\n";
cout << "Please exclude" << (num_people > MAXIMUM) << "people.\n";
}
else
{
cout << "It is legal to hold the meeting.\n";
cout << "An additional" << (MAXIMUM - num_people) << "people may attend the meeting.\n";
}
return 0;
}
im getting the errors before 'else' and 'return' aslso it is saying something is wrong with 'int main()'
PLEASE HELP!!