double ConvertStringToDouble (LPCTSTR psz)
{
LPTSTR pszStop;
errno = 0;//only if you might check this value
return _tcstod (psz, &pszStop);
}
or (if you don't like the "T" variables)
double ConvertStringToDouble (const char *psz)
{
char *pszStop;
errno = 0;
return strtod (psz, &pszStop);
}
Since CString has a type cast to LPCTSTR and since you won't be storing the value into another CString, then there isn't any need to use CString in the argument list. Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?