What is a copy constructor?
A. A constructor that allows a user to move data from one object to another
B. A constructor to initialize an object with the values of another object
C. A constructor to check the whether to objects are equal or not
D. A constructor to kill other copies of a given object.
Answer:B
What is a copy constructor?
A. A constructor that allows a user to move data from one object to another B. A constructor to initialize an object with the values of another object C. A constructor to check the whether to objects are equal or not D. A constructor to kill other copies of a given object.