Can a copy constructor accept an object of the same class as a parameter, in place of reference of the object? If No, why not possible?
Answer:
No. It is specified in the definition of the copy constructor itself. It should generate an error if a programmer specifies a copy constructor with a first argument that is an object and not a reference.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Answer:
No. It is specified in the definition of the copy constructor itself. It should generate an error if a programmer specifies a copy constructor with a first argument that is an object and not a reference.
need an explanation for this answer? contact us directly to get an explanation for this answer