Hi.
Im new to VC++ and have some problem creating a function which is given a CString and is supposed to return 1 if the CString is a valid positive double.
I think of something like
int CheckForDouble (CString input)
{
if ( input is a positive double )
{
return 1;
}
return 0;
}
If its a double I can safely use atof() in my program to work with the converted CString
if ( CheckForDouble ( stringvar ) == 1)
{
doublevar = atof ( stringvar )
}
Thanks for helping me get along!
Im new to VC++ and have some problem creating a function which is given a CString and is supposed to return 1 if the CString is a valid positive double.
I think of something like
int CheckForDouble (CString input)
{
if ( input is a positive double )
{
return 1;
}
return 0;
}
If its a double I can safely use atof() in my program to work with the converted CString
if ( CheckForDouble ( stringvar ) == 1)
{
doublevar = atof ( stringvar )
}
Thanks for helping me get along!