Chapter 20.  Scope and Storage Class

Table of Contents

20.1. Declarations and Definitions
20.2. Identifier Scope
20.2.1. Default Scope of Identifiers - More Detail
20.2.2. File Scope Versus Block Scope and operator::
20.2.2.1. Exercises: File Scope Versus Block Scope and operator::
20.3. Storage Class
20.3.1. Globals, static, and QObject
20.3.1.1. Globals and const
20.3.2. Exercises: Storage Class
20.4. Namespaces
20.5. Review Questions

[ fromfile: scopestorage.xml id: scopestorage ]

Abstract

Identifiers have scope, objects have a storage class, and variables have both. In this chapter, we discuss the difference between declarations and definitions and how to determine the scope of identifiers and the storage class of objects.