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  How do you call a destructor in C++?

Leave a Reply

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