Currently I have two classes, Drawable and Transformable and things like Actors inherit both of these, the problem is when drawing objects to the screen I iterate through a vector of Drawables which do not have the getPosition() function included in Transformable. Adding a virtual getPosition() to Drawable solves this but then creates the problem of ambiguous calls to the function elsewhere. So can I have Drawable inherit Transformable and Actor inherit Drawable and get the same result as if it were inheriting both classes?
EDIT: Drawables aren't all actors, some are sprites (game objects), primitive shapes, etc. Actually the only reason I need the getPosition() in the draw loop is because in order to fake depth, I loop through the vector to go from 0 Y coordinate to the bottom of the screen, objects higher up on the screen get drawn first and are then behind objects closer to the "front". I didn't write the Drawable/Transformable classes and I'd prefer to not have to completely change them in order to satisfy one function call in one instance. The only time this is a problem is when I reference the vector of Drawables. It doesn't quite make sense to me why this was designed the way it was because everything that uses the drawable class also inherits the transformable class, so they should just be one but they aren't.
My question is whether this:
class foo {}
class bar{}
class foobar : public foo, public bar {}
is the same as this
class foo {}
class bar : public foo {}
class foobar : public bar {}
Can an object inherit the public and protected members of the class their parent inherits?