В С++ класс vector хранит массив объектов. В этом случае я сохраняю указатели на объекты класса класса (Собаки). В какой-то момент я хочу рассматривать этот вектор как указатели на объекты базового класса (Животные). Это "правильный" /не противоречивый способ? Почему я не могу это сделать?
#include <vector>
using namespace std;
class Animal { }; 
class Dog : public Animal { };
int main(int argc, char *argv[]) {
    vector<Dog*> dogs;
    dogs.push_back(new Dog());
    dogs.push_back(new Dog());
    vector<Animal*> animals = dogs; // This doesn't seem to work.
    // This is really what I want to do...
    vector<Animal*> all_animals[] = {dogs, cats, birds};
}
Ошибка:
Untitled.cpp:11:18: error: no viable conversion from 'vector<class Dog *>' to 'vector<class Animal *>'
    vector<Animal*> animals = dogs;
                    ^         ~~~~
/usr/include/c++/4.2.1/bits/stl_vector.h:231:7: note: candidate constructor not viable: no known conversion from 'vector<Dog *>' to 'const std::vector<Animal *, std::allocator<Animal *> > &' for 1st argument
  vector(const vector& __x)
  ^
