Folks,
I'm trying to figure out the correct prototype syntax for the below constructor of my sub-class DEAD_CHARS and I was hoping someone would know how ?
The below implementation compiles for my DEAD_CHAR class and works when I attempt to assign a CHARACTER object to a DEAD_CHAR object.
Code:DEAD_CHARS(const CHARACTER &character, int turn_num = 5): CHARACTER(character){}
However what is the correct syntax in order to prototype the below implementation so that I can have the prototype in a dead_chars.h and the implementation in a dead_chars.cpp file ?
Cheers
Starkhorn
Here is the prototype in my dead_chars.h file for my DEAD_CHARS class. It's a sub-class of the super-class CHARACTER.
Code:#include "character.h" using namespace std; class DEAD_CHARS : public CHARACTER { public: DEAD_CHARS(); //Default constructor DEAD_CHARS(const CHARACTER &character, int turn_num = 5): CHARACTER(character){} int get_turn_death(); void set_turn_death(int turn_num); private: int turn_death; }; #endif



LinkBack URL
About LinkBacks


