Duplicate of this.
重复一遍。
In C++ you sometimes have to implement the copy constructor yourself (when you have pointer as a member usually). Over compiler generated copy constructor this has the disadvantage that when you add a member field and forget to add the copying line in the copy constructor, you have a problem, which is often hard to track down. I like to program defensively and this worries me a bit.In C++ you sometim