C++ method only visible when object cast to base class?

后端 未结 7 2427
栀梦
栀梦 2020-11-29 10:27

It must be something specific in my code, which I can\'t post. But maybe someone can suggest possible causes.

Basically I have:

class CParent
{
 publ         


        
7条回答
  •  萌比男神i
    2020-11-29 10:40

    The problem is CChild doesn't actually inherit from CParent.

    And so it doesn't have a doIt method that takes only one argument.

提交回复
热议问题