Can abstract classes have constructors C++?

Can it have constructor? Yes it can and the purpose is to initialize local variables from the base class. You should avoid using public constructor in Abstract and use protected only.

Sizin İçin Seçtik  What's the use of a constructor?

Leave a Reply

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