February 2005
Beginner to intermediate
272 pages
4h 53m
English
Initialization and assignment are different operations, with different uses and different implementations.
Let’s get it absolutely straight. Assignment occurs when you assign. All the other copying you run into is initialization, including initialization in a declaration, function return, argument passing, and catching exceptions.
Assignment and initialization are essentially different operations not only because they’re used in different contexts but also because they do different things. This difference in operation is not so obvious in the built-in types such as int or double, because, in that case, both assignment and initialization consist simply of copying some bits (but see also
Read now
Unlock full access