Now say I have:Code:class CEntity {
public:
CEntity ();
virtual ~CEntity ();
void calc_dmg (CEntity &obj);
};
class CPlayer : public CEntity {
};
class CBattlePlayer : public CPlayer {
};
class CEnemy : public CEntity {
};
CEnemy monster;
CBattlePlayer player;
can I call player.calc_dmg (monster)?
How is inheritance aligned with polymorphism, or is it not? Heh...