In C++, can I skip defining assignment operator after defining my own copy constructor?
When I define a class, I need to define my own copy constructor if I need deep-copy. Then, is it necessary to define the assignment operator as well? If it is skipped, does the assignment do shallow copy?
Aucun commentaire:
Enregistrer un commentaire