What is copy constructor explain?

The copy constructor is a constructor which creates an object by initializing it with an object of the same class, which has been created previously . The copy constructor is used to − Initialize one object from another of the same type. Copy an object to pass it as an argument to a function.

Sizin İçin Seçtik  What is destructor in C++ with example?

Leave a Reply

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