Hi,
I've got structure like this
class Object //abstract
{
virtual....=0;
};
class Monster : public Object {}; //also abstract
class Wumpus : public Monster {};
class Hero : public Monster {};
class Gun : public Object{};
class Cave : public Object
{
void add(Cave*);
void add(Monster*);
};
the second fnc in Cave suppouse to add any type of Monster into this cave. My question is how can I get real type of adding object that is how to check if I'm adding a Hero or a Wumpus?
Thank you.