What is the constructor in a class?

A class constructor is a special member function of a class that is executed whenever we create new objects of that class . A constructor will have exact same name as the class and it does not have any return type at all, not even void.

Sizin İçin Seçtik  Are speed and frequency directly proportional?

Leave a Reply

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