stoull
將字元序列轉換成 unsigned long long。
unsigned long long stoull(
const string& _Str,
size_t *_Idx = 0,
int _Base = 10
);
unsigned long long stoull(
const wstring& _Str,
size_t *_Idx = 0,
int _Base = 10
);
參數
參數 |
描述 |
---|---|
_Str |
要轉換的字元序列。 |
_Idx |
第一個未轉換字元的索引值。 |
_Base |
使用中的基底。 |
傳回值
unsigned long long 值。
備註
函式轉換項目的序列。 _Str 的成員型別 unsigned long long 的值 _Val ,就像是藉由呼叫 strtoull(_Str.c_str(), _Eptr, _Base), _Eptr 是內部物件的物件傳遞給函式。如果 _Str.c_str() == *_Eptr 就會擲回型別 invalid_argument物件。如果這類的呼叫會將 errno,就會擲回型別 out_of_range物件。則為,否則為,表示 _Idx 不為 null 指標, *_Idx 函式的存放區 *_Eptr - _Str.c_str() 並傳回 _Val。
需求
標題: <string>
命名空間: std