A derived class of logic_error an object of out_of_range is used for exceptions for out of range errors.
out_of_range(const string& what_arg);
Constructs an object of the class out_of_range. Initializes exception::what to the what_arg argument