Hi all,
I'm writing a program which uses inheritance but it won't compile! I believe the constructor of the base class is to blame, but I'm not sure as I've not had much experience with inheritance.
Please find 5 of my code files attached ( 5 is maximum allowed ) and the last 2 below for perusal.
Code:
// userControlledCharacterClass.h
#ifndef USERCONTROLLEDCHARACTERCLASS_H
#define USERCONTROLLEDCHARACTERCLASS_H
#include "RPG.h"
class userControlledCharacterClass: public RPG
{
public:
userControlledCharacterClass(); // constructor
userControlledCharacterClass( string, string, int, int, int, int ); // constructor
~userControlledCharacterClass(); // destructor
protected:
private:
};
#endif // USERCONTROLLEDCHARACTERCLASS_H
Code:
// userControlledCharacterClass.cpp
#include "userControlledCharacterClass.h"
using namespace std;
userControlledCharacterClass::userControlledCharacterClass()
{
} // end constructor userControlledCharacterClass
userControlledCharacterClass::userControlledCharacterClass( string a, string b, int c, int d, int e, int f )
{
setName( a );
setDescription( b );
setXP( c );
setHP( d );
setAP( e );
setLocation( f );
} // end constructor userControlledCharacterClass
userControlledCharacterClass::~userControlledCharacterClass()
{
cout << getName() << " has died!1" << endl;
} // end destructor ~userControlledCharacterClass()