Getting a vector into a function that expects a vector<Base*>

后端 未结 9 1809
日久生厌
日久生厌 2020-11-29 07:11

Consider these classes.

class Base
{
   ...
};

class Derived : public Base
{
   ...
};

this function

void BaseFoo( std::ve         


        
9条回答
  •  离开以前
    2020-11-29 07:49

    Generally you would start with a container of base pointers, not the other way.

提交回复
热议问题