我在message里面又这样写的 CDAttribute0 a0(HoriData*h); 可是又出现了这个错误 error C2664: 'AddPage' : cannot convert parameter 1 from 'class CDAttribute0 (__cdecl *)(struct HoriData *)' to 'class CPropertyPage *' There is no context in which this conversion is possible 该怎么办 ==|||
CDAttribute0::CDAttribute0(XXX,XXX)的.
CDAttribute0::CDAttribute0(HoriData*h) : CPropertyPage(CDAttribute0::IDD)然后我在message里面是这样定义的
CDAttribute0 a0
CDAttribute0 a0
===================
错了,它的构造函数中有参数,而你定义对象是没给它参数啊,应该是:CDAttribute0 a0(参数);
CDAttribute0 a0(HoriData*h);
可是又出现了这个错误
error C2664: 'AddPage' : cannot convert parameter 1 from 'class CDAttribute0 (__cdecl *)(struct HoriData *)' to 'class CPropertyPage *'
There is no context in which this conversion is possible
该怎么办 ==|||
================
能这样写吗?HoriData*h是什么啊,这里加的应该是一个参数啊,你写得怎么象是定义
CDAttribute0 a0(*h);
这样对不对
是不是还要对h进行定义
//初始化h
CDAttribute0 a0(h);
楼主回去学学基础知识