Copy Semantics Part 3: Copy Assignment

preview_player
Показать описание
These videos are for the data structures and object oriented programming in C++ class, CSCI 104, I am teaching at USC during Fall 2020. While this video is my own, it is the result of collaboration and adaptation of the work by my colleagues David Kempe and Mark Redekopp.

In this segment, we discuss default copy assignment operators and when it is necessary to write our own copy assignment operators for deep copies. We discuss how to implement a copy assignment operator for our Str class (that implements simplified subset of C++ string capabilities). We conclude our discussion of copy semantics by giving tips on when deep copies are necessary and the rule of three.
Рекомендации по теме