Is the following code problamatic regarding inserting into a list an object that inherits from two classes?
class A
{
}
class B
{
}
class C : public A, public B
{
}
C *myObj = new C();
std::list<A*> myList;
myList.push_front(myObj);
Is creating a list of type A and inserting an object of type C which is part of type B problematic? I know this code compiles but I am affrade of memory issues. If its a problem, what other options do I have to solve this?