Learn how to create and use a copy constructor in C++ to initialize an object by using another object of the same type. The idea when defining a copy constructor is generally to create a copy of the object (as this is what would be expected when we initialize one object with another). The default copy constructor in C++ creates a shallow copy of an object, which may cause problems if our objects use dynamically allocated memory. In this video we demonstrate how to use the copy constructor to create a deep copy of the object, which is a common use case for creating a copy constructor. Source code: https://github.com/portfoliocourses/cplusplus-example-code/blob/main/copy_constructor.cpp. Check out https://www.portfoliocourses.com to build a portfolio that will impress employers!