I'm making a snake game using different classes. I have a movingObject class that is the base class for everything that moves. I have a player class that inherits from it. The player is basically the head of the snake, then I have another class for the tail. In the player class I have a vector of tail segments, so it can grow. I have a function in my game class that detects collisions between moving objects. My tail works fine, grows and all that if I don't have it inherit from moving object, but in order to make it solid, in order to detect a collision, I need to make it inherit from movingObject. It complains a ton though whenever I try. Is there some rule that I can't have a member object of the same base class? I'll try to include an abbreviated version of what I've got to help you understand.
is not a helpful description of the problem. Is there a reason why you thought the best way to get help would to be to withold the actual error messages from us?
Is there some rule that I can't have a member object of the same base class?