Hello! I have this problem again!
If I try to use getMaxDmg(),.. with a CArrow_i object it uses the CItem function! Not CArrow_is!
What do I wrong? :/ Thank you! :)
Oh, and I can'T make the functions pure virtual!
class CItem
{
public:
virtual int getMinDmg( void ){ return -1; };
virtual int getMaxDmg( void ){ return -1; };
virtual const int getMinDmg( void ) const{ return -1; };
virtual const int getMaxDmg( void ) const{ return -1; };
protected:
//..
};
class CArrow_i : public CItem
{
public:
int getMinDmg( void ) { LOG << "returnmin: " << min_dmg << ENDL; return min_dmg; }
int getMaxDmg( void ) { LOG << "returnmax: " << max_dmg << ENDL; return max_dmg; }
const int getMinDmg( void ) const{ LOG << "returnmin: " << min_dmg << ENDL; return min_dmg; }
const int getMaxDmg( void ) const{ LOG << "returnmax: " << max_dmg << ENDL; retur
n max_dmg; }
private:
int min_dmg;
int max_dmg;
};