Initialization of Composite Objects

The issues related to initialization play an important role in programming. Failure to initialize a computational object properly is a common source of programming errors. C++ offers the programmer a rich set of techniques for initialization of program components.

When I was describing the syntax of defining scalar variables in Chapter 3, "Working with C++ Data and Expressions," the next discussion topic was the syntax of giving initial values to these variables. When I was describing the syntax of C++ aggregates in Chapter 5, "Aggregation with Programmer-Defined Data Types," —arrays, structures, enumerations, unions, and bit fields—the next topic for discussion was the initialization of these program components. ...

Get Core C++ A Software Engineering Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.