Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 11. Constructors and Destructors... > Overloading the Assignment Operator

Overloading the Assignment Operator

On several occasions, I told you that the object initialization and object assignment are different things in C++. When you are dealing with built-in data types, this distinction is often academic. Consider, for example, the following segment of the client code.

int v = 5; int u = v;                 // variable u is initialized


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial