Significance of Copy Constructor
Understand the purpose and significance of copy constructors.
We'll cover the following...
We'll cover the following...
Problem
What purpose does a copy constructor serve and how is it different from a normal constructor?
Coding solution
Here is a solution to the problem above.
Explanation
A copy constructor gets invoked in three situations. These are as follows:
- When instantiating one object and initializing it