What is a copy constructor in C++?

Copy constructor is called when a new object is created from an existing object, as a copy of the existing object . Assignment operator is called when an already initialized object is assigned a new value from another existing object.28 Haz 2021

Sizin İçin Seçtik  Why destructor is used when delete is there?

Leave a Reply

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