Search code examples
c++visual-studio-2010inheritanceabstract-classpure-virtual

How can I find out which method of a derived class is not implemented?


I have an abstract base class, where some functions are implemented and some are purely virtual.

From this base class, I have created a derived class which implements all virtual functions.

However, it still complains that the derived class is abstract. I assume that I have forgotten to implement one method, but I cannot see which one. Is there any way to get a list of inherited virtual methods? I am using Visual Studio 2010.


Solution

  • When compilation fails due to an abstract class instantiation attempt you should get the exact method that is missing in the output tab, see the following example:

    8>MVSystemTesting\ReportsServiceMock.cpp(10): error C2259: 'CMailslotIPCChannel' : cannot instantiate abstract class
    8>          due to following members:
    8>          'void CIPCChannelBase::Listen(void)' : is abstract
    8>          d:\tfs\IPCChannelBase.h(27) : see declaration of 'CIPCChannelBase::Listen'
    

    Here you can see that Listen is not implemented.

    This is how you open the output tab: Output tab