64,675
社区成员
发帖
与我相关
我的任务
分享
public:// C2259.cpp
// compile with: /c
class V {
public:
void virtual func() = 0;
};
class A : public V {};
class B : public V {
public:
void func();
};
V v; // C2259, V is an abstract class
A a; // C2259, A inherits func() as pure virtual
B b; // OK, B defines func()
// C2259d.cpp
// compile with: /clr:oldSyntax
public __gc __interface MyInterface {
void MyMethod();
};
__gc class MyDerivedClass : public MyInterface {
// Uncomment the following line to resolve.
// public:
void MyMethod() {};
// or the following line
// void MyInterface::MyMethod() {};
};
int main() {
MyDerivedClass *instance = new MyDerivedClass(); // C2259
}
public:
//创建主窗口
virtual CTest * CTest() { return new CTest2; }//这一句出了问题
//报错
error C2259: 'CGameClientDlg' : cannot instantiate abstract class
1> due to following members:
1> 'void CGameFrameDlg::OnEventContinueGame(void)' : is abstract
1> d:\vs2008\library\include\gameframedlg.h(120) : see declaration of 'CGameFrameDlg::OnEventContinueGame'