Code:
try
{
return MapContainer.at(index) ;
}
catch (std::exception& e)
{
std::cout << "Element " << index << ": index exceeds vector dimensions." << std::endl;
}
vector.at ist doch sicher? Warum throwt er sich da einen wenn man index als 1 nimmt anstelle von 0 (ist nur 1 objekt im vector), ist ja nur out of bounce und dafür ist die exception ja prädestiniert oder?






