Quick A: Try
Recently on SO:
I am new to c++11 programming and now I'm trying to figure out if it is possible to create an array of shared pointers to different types. For example, something like that:vector<shared_ptr<**???**>> v; v.push_back(shared_ptr<int>(new int)); v.push_back(shared_ptr<MyClass>(new MyClass()));
or any other way to pass
shared_ptrwithout knowing its type.