Content deleted Content added
Tag: extraneous markup |
Reverted 2 edits by 42.117.32.109 (talk): Experimental / sandbox edits. (TW) |
||
Line 4:
==C family of languages==
In C/C99/C++, an '''initializer''' is an optional part of a [[declarator (computing)|declarator]]. It consists of the '=' character followed by an [[expression (programming)|expression]] or a comma-separated list of expressions placed in curly brackets (braces). The latter list is sometimes called the "initializer list" or "initialization list", although the term "initializer list" is formally reserved for initialization of class/struct members in C++, see below.
A declaration which includes initialization is commonly called '''definition'''.
Line 46:
[[C++11]] provides for a [[C++11#Initializer_lists|more powerful concept of initializer lists]], by means of a template, called <tt>std::initializer_list</tt>.
Data initialization may occur without explicit syntax in a program to do so. For example, if [[static variable]]s are declared without an initializer, then those of [[primitive data type]]s are initialized with the value of zero of the corresponding type, while static objects of class type are initialized with their [[default constructor]]s.
== See also ==
|