stof
Bir karakter dizisi için float dönüştürür.
float stof(
const string& _Str,
size_t *_Idx = 0
);
float stof(
const wstring& _Str,
size_t *_Idx = 0
);
Parametreler
Parametre |
Description |
---|---|
_Str |
Dönüştürülecek karakter dizisi. |
_Idx |
Dönüştürülmeyen ilk karakter dizin değeri. |
Dönüş Değeri
Kayan nokta değeri.
Notlar
Öğelerin sırası işlev dönüştürür _Str bir değer _Val türü float göre arama gibi strtof(_Str.c_str(), _Eptr), 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