stoul
İmzalanmamış bir karakter sırası dönüştürür uzun.
unsigned long stoul(
const string& _Str,
size_t *_Idx = 0,
int _Base = 10
);
unsigned long stoul(
const wstring& _Str,
size_t *_Idx = 0,
int _Base = 10
);
Parametreler
Parametre |
Description |
---|---|
_Str |
Dönüştürülecek karakter dizisi. |
_Idx |
Dönüştürülmeyen ilk karakter dizin değeri. |
_Base |
Kullanılacak numarasını temel. |
Dönüş Değeri
İşaretsiz uzun tamsayı değeri.
Notlar
Öğelerin sırası işlev dönüştürür _Str bir değer _Val türü unsigned long göre arama gibi strtoul(_Str.c_str(), _Eptr, _Base), burada _Eptr bir işleve iç nesnesidir._Str.c_str() == *_Eptr Türünde bir nesne oluşturduğunda invalid_argument.Böyle bir çağrı ayarlarsýnýz, errno, türünde bir nesne oluşturduğunda out_of_range.Aksi takdirde, eğer _Idx bir null işaretçi işlevi mağazalar değil *_Eptr - _Str.c_str() , *_Idx ve döner _Val.
Gereksinimler
Başlık: <string>
Namespace: std