You are inheriting the methods and variables from the Base class, and thus inherit all methods declared in those classes into the class dog.
Let me guess you have this:
Class Rescue
Class Boom
Class Drug
Class Dog : public Rescue
A better way to do this is create a Base class called Dog. Let the Boom, Drug, and Rescue classes be derived from this so they inherit generic function/variables from Dog. So you have something like this:
Code:
class Dog {
//some methods/variables
};
Code:
class Rescue : public Dog
{
};
class Boom : public Dog
{
};
class Drug : public Dog
{
};
Then implement the necessary function in the derived classes.