The key for the map is a string. Unfortunately 0 will automatically convert to a string, so there is no compilation error.
You might want
Test = vEntity[0]->ComponentList["TransformComponent"]->getTypeName();
or
Test = vEntity[0]->ComponentList.begin()->second->getTypeName();
Interesting fact: BaseComponent should really have a virtual destructor but you get away without one in this case because the smart pointer is smart enough to call the right one anyway. Still, it's better to have one.






