So, lets say I have a superclass named Lights. I then have two subsclasses that extend Lights, Light_Omni and Light_Spot. Is it possible in Lights to have Light_Omni and Light_Spot objects?
I tried forward declaration of the sub-classes in Lights.h, as I read somewhere, for not the same case as mine, it's similiar though. But I'm either doing it wrong, or it just won't work.
class LG_Light_Spot;
class LG_Light_Omni;
class LG_Lights
{
LG_Light_Spot obj1;
LG_Light_Omni obj2;
};
class LG_Light_Spot :
public LG_Lights
{};
class LG_Light_Omni :
public LG_Lights
{};
Right now I'm getting "unresolved externals" when i try to build the project. Hope it's not a stupid question.