here is the deal:
class BASE
{
BASE()
~BASE;
virtual void Affiche()=0;
};
class PLAYER: public Base
{
PLAYER();
~PLAYER()
void Affiche(){...};
void ShootGrenade(){...};
}
class OBJET: public Base
{
OBJET();
~OBJET()
void Affiche(){...};
void Update(){...};
}
class LEVEL
{
BASE *Player;
BASE *Objet;
void Init();
}
now in init i want to do that:
void LEVEL::Init()
{
Player = new PLAYER();
Objet = new OBJET();
// -- that s working but when i do that:
Player->ShootGrenade();
// -- it s says : Shootgrenade is not a member of BASE
}
so i don t know how to say to the compiler that finally player is not a base but is a player