►Full C++ Series Playlist: • The C++ Programming Language
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel: / @mikeshah
►Lesson Description: In this lesson I cover the copy constructor, and copy assignment operator. I start by showing how the compiler gives you these two special functions for classes for free, using the compiler generated ones. Unfortunately, this is not sufficient, as when we have to dynamically allocate memory, the trivial copy can result in problems like double frees or unwanted sharing of data. Next I show you how to avoid making these 'shallow' copies, and write your own copy constructor and copy-assignment operators to perform a deep copy.
►YouTube Channel: / mikeshah
►Please like and subscribe to help the channel!
Watch video Classes part 3 - Copy Constructor, Copy Assignment(Deep and Shallow Copy) | Modern Cpp Series Ep. 39 online, duration hours minute second in high quality that is uploaded to the channel Mike Shah 15 March 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 10,663 times and liked it 382 visitors.