How one object of same class assign to the other object of the same class in c++? -


i know can directly assign same class objects in c++,but happen behind scene?

there's called "default copy-constructor" , "default assignment-operator". unless overload these methods in class, default behavior non-static members of class copied one-by-one source target class.

a little more: includes pointers, btw. why should overload these operators , follow rule of three if have pointers members.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -