Error : base class constructor must explicitly initialize parent class constructor

后端 未结 5 688
傲寒
傲寒 2021-02-02 07:22

I am new to c++. When I try to compile the code below , I get this error

constructor for \'child\' must explicitly initialize the base class \'parent\' whic

5条回答
  •  梦如初夏
    2021-02-02 07:56

    Hi Just try add default constructor in your parent class (No argument constructor) then compile it. Hope this might resolve your problem.

提交回复
热议问题