0

c++ MFC编译错误

错误 C2470:“CMySink”:看起来像函数定义,但没有参数列表;跳过明显的正文 d:\faxmanager\faxmanager\mysink.cpp 34

.h 文件

class CMySink : public CCmdTarget
{
    DECLARE_DYNAMIC(CMySink)
...

protected:
    DECLARE_MESSAGE_MAP()    
     void OnJobAdded(FAXCOMEXLib::IFaxServer *pFaxServer, BSTR bstrJobId);
    ...
};

.cpp 文件

BEGIN_DISPATCH_MAP(CMySink, CCmdTarget)
  DISP_FUNCTION (CMySink ,"OnOutgoingJobAdded", OnJobAdded, VT_EMPTY, VTS_I4 VTS_BSTR)
END_DISPATCH_MAP()

void CMySink:OnJobAdded(FAXCOMEXLib::IFaxServer *pFaxServer,  BSTR bstrJobId) 
{ 

}
4

1 回答 1

2
void CMySink:OnJobAdded

应该

void CMySink::OnJobAdded
于 2012-08-21T05:45:13.373 回答