Skip to content

Glossary: Data Structures and Algorithms in C++

std::stoi

Also written: stoi

Converts text to an int, as in to_minutes. It throws invalid_argument if the text isn't a number.

Where the book teaches it

Related terms

Exceptions (runtime_error, out_of_range, invalid_argument)