How do I call a super constructor in C++?

If you want to call a superclass constructor with an argument, you must use the subclass’s constructor initialization list . Unlike Java, C++ supports multiple inheritance (for better or worse), so the base class must be referred to by name, rather than “super()”.

Sizin İçin Seçtik  What are base class and derived class with reference to OOP?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do I call a super constructor in C++?

If you want to call a superclass constructor with an argument, you must use the subclass’s constructor initialization list . Unlike Java, C++ supports multiple inheritance (for better or worse), so the base class must be referred to by name, rather than “super()”.

Sizin İçin Seçtik  What does final mean in a method's signature?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do I call a super constructor in C++?

If you want to call a superclass constructor with an argument, you must use the subclass’s constructor initialization list . Unlike Java, C++ supports multiple inheritance (for better or worse), so the base class must be referred to by name, rather than “super()”.

Sizin İçin Seçtik  Which is correct way to use inheritance in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *