I wasn't sure how to phrase the question in the title. But here is my question. First lets say I have something like this:
Where A and B are "interfaces" meaning they contain mostly if not all pure virtual functions.Code:class A { ... }; class B { ... }; class C : public A, public B { ... };
What I would like to do is have a main list, in the main part of my code:
But in the subsystems of the code that only need to know about A and not about B or C, I would like to have a list something like this:Code:std::list<C*> mainList;
So in otherwords is there a way to make pointer to a list of type "pointer to A" from a list of type "pointer to C" without having to create a new list and copy the elements one at a time?Code:std::list<A*>* alist = &mainlist;
I hope that makes sense.
Adam.



1Likes
LinkBack URL
About LinkBacks



