Chapter 19.  Types and Expressions

Table of Contents

19.1. Operators
19.1.1. Table of Operators
19.2. Statements and Control Structures
19.2.1. Statements
19.2.2. Selection Statements
19.2.2.1. Exercises: Selection Statements
19.2.3. Iteration
19.2.3.1. Exercises: Iteration
19.2.4. Review Questions
19.3. Evaluation of Logical Expressions
19.4. Enumerations
19.5. Signed and Unsigned Integral Types
19.5.1. Exercises: Signed and Unsigned Integral Types
19.6. Standard Expression Conversions
19.6.1. Exercises: Standard Expression Conversions
19.7. Explicit Conversions
19.8. Safer ANSI C++ Typecast operators
19.8.1. static_cast and const_cast
19.8.1.1. Exercises: static_cast and const_cast
19.8.2. reinterpret_cast
19.8.3. Why Not Use C-Style Casts?
19.8.4. More About explicit Conversion Constructors
19.9. Overloading Special Operators
19.9.1. Conversion Operators
19.9.2. The Subscript operator[]
19.9.3. The Function Call operator()
19.9.3.1. Exercises: The Function Call operator()
19.10. Runtime Type Identification (RTTI)
19.10.1. typeid operator
19.11. Member Selection Operators
19.12. Exercises: Types and Expressions
19.13. Review Questions

[ fromfile: types.xml id: types ]

Abstract

This chapter seeks to provide a deeper understanding of C++'s strong typing system and shows how expressions are evaluated and converted.