Parse the specified str as a signed integer; see stol for details.

Synopsis

Declared in <bslstl_string.h>

int
stoi(
    string const& str,
    std::size_t* pos = 0,
    int base = 10);

Return Value

int value parsed from str

Parameters

Name

Description

str

string to parse

pos

optional output for the index after the parsed value

base

numeric base for parsing (0 or 2..36)

Created with MrDocs