Content deleted Content added
Cybercobra (talk | contribs) →Initializer list: formatting, concision |
|||
Line 33:
===Initializer list===
In C++, a [[constructor]] of a class/struct can have an '''initializer list''' within the definition but prior to the constructor body. It assigns initial values to the members of the class/struct object.
Example:
<source lang="c">
Line 41:
};
</source>
Here, the construct
Sometimes the term "initializer list" is also used to refer to the list of expressions in the array or struct initializer.
===Default initialization===
|