How do you handle a “cannot instantiate abstract class” error in C++?

后端 未结 8 2097
暗喜
暗喜 2020-12-15 17:02

How do you handle a \"cannot instantiate abstract class\" error in C++? I have looked at some of the similar errors here and none of them seem to be exactly the same or prob

8条回答
  •  无人及你
    2020-12-15 17:51

    Visual Studio's Error List pane only shows you the first line of the error. Invoke View>Output and I bet you'll see something like:

    c:\path\to\your\code.cpp(42): error C2259: 'AmbientOccluder' : cannot instantiate abstract class
              due to following members:
              'ULONG MysteryUnimplementedMethod(void)' : is abstract
              c:\path\to\some\include.h(8) : see declaration of 'MysteryUnimplementedMethod'
    

提交回复
热议问题