When using std::map in c++, is it possible to store inherited classes as their \"base class\" in the map and still being able to call their overloaded methods? See this exam
Dynamic polymorphism works only with references and pointers. In case of using containers, which copy objects around inside them -- only with pointers.
If you would force a cast from super type to base type without using pointer or reference, the object memory would be sliced. Check this out: Object slicing wikipedia article