Kernel.h
namespace GateServer { class CKernel { using PFMsgHandler = std::function<bool(const char * pMsg, int MsgLen)> public: bool Initialize(); PFMsgHandler m_MsgHandler[100]; bool OnMsgFromCS(const char * pMsg, int MsgLen); } }Kernel.cpp
#include "Kernel.h" namespace GateServer { bool CKernel::Initialize() { m_MsgHandler[0] = &CKernel::OnMsgFromCS; //error return true; } }
When I try to compile a program, I get the following error:
Error C2679 binary '=': operator ol ol (__thiscall GateServer :: CGSKernel :: *) (const char *, int) ' \ projects \ c ++ \ sonic \ server \ gateserver \ gskernel \ gskernel.cpp 28