initializer
An initializer is a construct that provides initial values to a variable or to an object at the moment of creation. Initialization occurs as the value is bound to the variable or built into the object's state, and it is distinct from later assignment, which can alter the value after creation.
Variable initialization can be achieved by literals or expressions attached to a declaration, as in int a
Object initialization uses a constructor or equivalent mechanism to set up the internal state of a new
Common forms include: C and C++ brace or list initialization, where a scalar can be initialized with
Initialization semantics vary by storage duration and language: static storage in C is zero-initialized; automatic variables
Understanding the distinction between initialization and assignment helps prevent uninitialized-use errors and clarifies how programs seed
---