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

后端 未结 7 2405
栀梦
栀梦 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条回答
  •  遥遥无期
    2020-11-29 10:53

    You are hitting a classic problem. You need using CParent::doIt; in your CChild class. I'll scrounge up the duplicate questions.

    Edit:

    Here's my answer to essentially the same question: Overriding a Base's Overloaded Function in C++

提交回复
热议问题