Skip to content

Glossary: C++ Basics

std::stoi and std::stod

Also written: std::stoi, std::stod, std::to_string

Functions that convert text to an `int` or `double`, with `std::to_string` going the other way. `std::stoi("twelve")` throws an exception.

Where the book teaches it

Related terms

std::stringException