For future reference, std::out_of_range means you are trying to access an element that does not exist.