i am having trouble getting this silly thing to work.
i am getting an error that says "return type specification for constructor invalid"
i am using dev-c++ to compile it
it is the 24th line down, with the //THIS LINE HAS THE ERROR
// Player class declaration
class Player
{
private:
char playerName[15];
char sex; // Male or Female (M/F)
short int health;
short int strength;
short int agility;
short int magic;
short int gold;
public:
Player(int str, int agi); // constructor
~Player(); // destructor
void reportStats(); // shows stats
void attack(); // kill monster
void move(); // move N, E, S, or W (do i need parameters?)
void rest();
void getPlayerInfo(); // name, sex
}
// constructor definition
Player::Player(int str, int agi) // THIS LINE HAS THE ERROR
{
strength = str;
agility = agi;
health = 10;
magic = 20;
gold = 20;
}
Player::~Player() // destructor (does nothing for now)
{
}