What is constructor and destructor in OOP?

Constructor in C++ is a special member function of a class whose task is to initialize the object of the class. A destructor is also a member function of a class that is instantaneously called whenever an object is destroyed.

Sizin İçin Seçtik  1 Reşat Altın kaç çeyrek eder?

Leave a Reply

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