C ++ deep copy and shallow copy details, should

premise

In the process of copying the object, if no custom copy constructor, the compiler provides a default copy constructor, the default copy constructor for basic types of member variables, in bytes copied, for the class member variable It invokes the corresponding copy constructor.

Information notes

In the "high-quality C C ++ Programming," Chapter 9, has this to say following a similar description in the "C ++ primer" and "effective C ++" has mentioned, is a copy of the issue constructor, which is OO programming must be noted one question.

 

 

 

 

 Detailed description link: https://blog.csdn.net/weixin_41143631/article/details/81486817

 

Guess you like

Origin www.cnblogs.com/evenleee/p/11455791.html