Why abstract class has constructor even though you Cannot create object?

you can’t create a object of abstract class because there is an abstract method which has nothing so you can call that abstract method too . If we will create an object of the abstract class and calls the method having no body(as the method is pure virtual) it will give an error.

Sizin İçin Seçtik  What is meant by abstract class in C++?

Leave a Reply

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