stoll

변환 된 문자 시퀀스에는 long long.

long long stoll(
    const string& _Str, 
    size_t *_Idx = 0,
    int _Base = 10
);
long long stoll(
    const wstring& _Str, 
    size_t *_Idx = 0,
    int _Base = 10
);

매개 변수

Parameter

설명

_Str

변환할 문자 시퀀스입니다.

_Idx

변환 되지 않은 첫 번째 문자의 인덱스 값입니다.

_Base

사용 하 여 숫자 기본입니다.

반환 값

long long 값

설명

함수 시퀀스의 요소를 변환 _Str 값 _Val 형식의 long long 를 호출 하는 경우에 strtoll(_Str.c_str(), _Eptr, _Base)여기서 _Eptr 개체 내부에 함수입니다.경우 _Str.c_str() == *_Eptr 형식의 개체를 throw invalid_argument.이러한 호출을 설정 하는 경우 errno, 해당 형식의 개체를 throw out_of_range.그렇지 않으면 if _Idx 는 null 포인터가 함수 저장소 *_Eptr - _Str.c_str() 에서 *_Idx 및 반환 _Val.

요구 사항

헤더: <string>

네임 스페이스: std

참고 항목

참조

string (<string>)

wstring

<string>