Original Post
Hi All: Here I have two classes: That's the basic structure. I want to make childlist as a inheritance of baselist, so I can pass a childlist to the algorithm routine like: Is there anyway I can do this please? Or if I need to define a new list class, how can I do it please? Thanks [Edited by - Asuralm on March 3, 2008 5:43:49 AM]
class BaseClass{
...
};
typedef vector<BaseClass> baselist;
class ChildClass : public BaseClass{
...
};
typedef vector<ChildClass> childlist;
void algorithm(baselist alist){
...
};
childlist alist;
algorithm(alist);