Skip to content

Glossary: Data Structures and Algorithms in C++

Exceptions (runtime_error, out_of_range, invalid_argument)

Also written: std::runtime_error, runtime_error, std::out_of_range, out_of_range, std::invalid_argument, invalid_argument

Standard exception types that stop a program when thrown. at() throws out_of_range for a missing index or key, stoi throws invalid_argument on bad text, and the planner throws runtime_error for a missing file.

Where the book teaches it

Related terms

at()std::stoi