c++中的纯虚函数和提示"cannot instantiate abstract class due to following members"
首先看一下下面的代码
bool CMatrixAgent::OnTaskStart() { m_thread.StartThread(); return true; } void CMatrixAgent::OnTaskStop() { } void CMatrixAgent::OnDealReportTask(CVorxProto* pTask) { } void CMatrixAgent::OnDealQueryTask(CVorxProto* pTask) { } void CMatrixAgent::OnDealHeartReturn(CVorxProto* pTask) { } void CMatrixAgent::OnDealHeartQuery(CVorxProto* pTask) { }
如果不这样,就会有"cannot instantiate abstract class due to following members"的提示。
转载请注明原创链接:http://blog.csdn.net/wujunokay/article/details/12295287