F
frohlinger
Hi,
I need to perform some numeric calculations on a numeric float value,
that is received as wstring.
I would like to perform a check before converting the wstring to
float, checking that indeed the wstring contains a numeric value.
This is the actual conversion:
double fValue = _wtof(strValue.c_str());
if strValue contains some characters (e.g.: 'aaa'), _wtof returns 0,
therefore I do not really know that the input was initially invalid.
Any ideas how to detect it?
Thanks, Gabi.
I need to perform some numeric calculations on a numeric float value,
that is received as wstring.
I would like to perform a check before converting the wstring to
float, checking that indeed the wstring contains a numeric value.
This is the actual conversion:
double fValue = _wtof(strValue.c_str());
if strValue contains some characters (e.g.: 'aaa'), _wtof returns 0,
therefore I do not really know that the input was initially invalid.
Any ideas how to detect it?
Thanks, Gabi.