6.9. Storage Classes and Storage Duration

The programs you’ve seen so far use identifiers for variable names and functions. The attributes of variables include name, type, size and value. Each identifier in a program also has other attributes, including storage duration, scope and linkage.

C++ provides five storage-class specifiers that determine a variable’s storage duration: register, extern, mutable and static. This section discusses storage-class specifiers register, extern and static. Storage-class specifier mutable is used exclusively with classes and thread_local is used in multithreaded applications—these are discussed in Chapters 21 and 24, respectively.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.102.178