注册 登录
编程论坛 VC++/MFC

前辈帮忙看下 这个字符转双精度数错在了哪里?有点急!!

瑞锋online 发布于 2017-12-28 13:03, 1825 次点击
这是我摘录出来的VC6.0下
CString mstr;
mstr+='7';
double m_num1=wcstod(mstr,NULL);
错误为:cannot convert parameter 1 from 'class CString' to 'const unsigned short *'
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
2 回复
#2
yuccn2018-01-03 17:57
cannot convert parameter 1 from 'class CString' to 'const unsigned short *'

原因 写的很明确了哦
#3
rjsp2018-02-07 16:33
    CString mstr;
    mstr += _T('7');
    double m_num = _tcstod( mstr, NULL );
1