Error : base class constructor must explicitly initialize parent class constructor

The parent class has an explicit constructor, so compiler will not add an implicit ’empty’ constructor to it. Additionally your constructor has a parameter, so compiler can not generate an implicit call to it. That’s why you must do it explicitly.

This way:

 child::child(int a) : parent(a)
 {
 }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)