Initialization (programming): Difference between revisions

Content deleted Content added
C++Bro123 (talk | contribs)
m Improve C++ examples
Line 8:
A declaration which includes initialization is commonly called '''definition'''.
 
Many find it convenient to draw a distinction between the terms "declaration" and "definition", as in the commonly seen phrase "the distinction between a ''declaration'' and ''definition''...", implying that a declaration merely designates a data object (or function). In fact, according to the [[C++ standard]], a definition ''is'' a declaration. Still, the usage "declarations and definitions", although formally incorrect, is common.<ref>''C++ FAQs'', by Cline, Lomow, and Girou, Addison-Wesley, 1999, {{ISBN|0-201-30983-1}}.</ref> However, although all definitions counts as a declarations, the opposite is not true. All declarations are not definitions.
 
C examples: