Help me please. I don't know where the error is.
If you find it i will appreciate it. Very much.
It says its inhere somewhere :
else (ENEMIES > ADVENTURERS)
{
cout << "\nAlong the way a band of Ogres ambushed the party. ";
cout << "All fought bravely under the command of " << LEADER;
cout << "But still, they were defeated.";
}
Here is the whole code :
//The Story
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
using std::string;
int main()
{
const int GOLD = 1200;
int ADVENTURERS, ENEMIES, SURVIVORS;
string LEADER;
// Player Info
cout << "Welcome to the Treasure Hunt\n" ;
cout << "Please enter the following\n\n" ;
cout << "Enter your name: ";
cin >> LEADER;
cout << "Enter group size: " ;
cin >> ADVENTURERS;
cout << "Enter the number of enemies: " ;
cin >> ENEMIES;
SURVIVORS = ADVENTURERS - ENEMIES;
//Telling the story
cout << "\n\nA brave group of " << ADVENTURERS << "set out on a Treasure Hunt. ";
cout << "They were after the lost treasure of the Ancient Dwarves. ";
cout << "The group was led by a legendary leader, " << LEADER << ". \n";
if (ENEMIES < ADVENTURERS)
{
cout << "\nAlong the way a band of Ogres ambushed the party. ";
cout << "All fought bravely under the command of " << LEADER;
cout << ", and the Ogres were defeated, but at a cost of " << ADVENTURERS - ENEMIES <<" great men.";
cout << "The party was about to give it all up, when they stumbled upon the treasure. They found " << GOLD << " gold pieces.";
cout << " Each party member got" << GOLD / SURVIVORS << " gold pieces.";
}
else (ENEMIES > ADVENTURERS)
{
cout << "\nAlong the way a band of Ogres ambushed the party. ";
cout << "All fought bravely under the command of " << LEADER;
cout << "But still, they were defeated.";
}
cin.ignore();
return 0;
cin.get();
}