About base class in derived class initialization

后端 未结 5 1798
醉梦人生
醉梦人生 2021-01-24 10:41

guys. I see several cases like:

class Derived:public Base{

public:
    Derived(...):Base(...){}
}

Is what situation or is there any principle

5条回答
  •  不知归路
    2021-01-24 11:34

    If you have multiple constructor in your base class (basically entry point), So you have choice to call any of them.

提交回复
热议问题