private inheritance

后端 未结 6 450
清歌不尽
清歌不尽 2020-11-29 12:35

I dont completely understand this:

class Base
{
    public:
    Base()
    {
        cout<<\"Base\" << endl;
    }

    virtual void call()
    {         


        
6条回答
  •  执笔经年
    2020-11-29 13:03

    If you inherit privately any code that requires the conversion from Derived* to Base* must be a member or a friend of the Derived class.

提交回复
热议问题