Constructor (object-oriented programming): Difference between revisions

Content deleted Content added
Flyer22 Frozen (talk | contribs)
m Reverted edits by 14.141.78.211 (talk) to last revision by 99.13.192.9 (HG)
Line 50:
=== Copy constructors ===
 
[[Copy constructor]]s define as Mahendra Kumar Sahuthe actions performed by the compiler when copying class objects. A copy constructor has one formal parameter that is the type of the class (the parameter may be a reference to an object).
It is used to create a copy of an existing object of the same
class. Even though both classes are the same, it counts as a conversion