Copying and Copy Constructors in C++
The Cherno The Cherno
633K subscribers
414,103 views
0

 Published On Sep 13, 2017

Patreon ►   / thecherno  
Twitter ►   / thecherno  
Instagram ►   / thecherno  
Discord ► https://thecherno.com/discord

In this video we're talking about copying in C++. Copying objects (and data) is commonly necessary in C++, and to properly facilitate that for our custom types, we need to add something called a copy constructor, which performs a deep copy of our object, if one is necessary. Something called a "(copy) assignment operator" is also sometimes necessary, but we'll talk about that in another video. Copying is not free however, and can slow down your program, so try and avoid it if possible.

Series Playlist ►    • C++  

Thank you to the following Patreon supporters:
- Samuel Egger
- Dominic Pace

Gear I use:
-----------------
BEST laptop for programming! ► http://geni.us/pakTES
My FAVOURITE keyboard for programming! ► http://geni.us/zNhB
FAVOURITE monitors for programming! ► http://geni.us/Ig6KBq

MAIN Camera ► http://geni.us/t6xyDRO
MAIN Lens ► http://geni.us/xGoDWT
Second Camera ► http://geni.us/CYUQ
Microphone ► http://geni.us/wqO6g7K

show more

Share/Embed