230k views
0 votes
Name three situations when a copy constructor executes.

1 Answer

2 votes

Answer:

1. When an object of the class is passed (to a function) by value as an argument.

2. When an object is constructed based on another object of the same class.

3. When compiler generates a temporary object.

Step-by-step explanation:

User Spong
by
5.7k points