How does a deep copy constructor work?

closed account (Ey80oG1T)
When using pointers and constructors, sometimes you may accidentally have some mishaps and only shallow copy.

So how do you deep copy a constructor?
That affects the so-called rule-of-three/five/zero: https://en.cppreference.com/w/cpp/language/rule_of_three


A working example is showed here: https://cpppatterns.com/patterns/rule-of-five.html
Topic archived. No new replies allowed.