Part III.  C++ Language Reference

Table of Contents

19. Types and Expressions
19.1. Operators
19.1.1. Table of Operators
19.2. Evaluation of Logical Expressions
19.3. Enumerations
19.4. Signed and Unsigned Integral Types
19.4.1. Exercises: Signed and Unsigned Integral Types
19.5. Standard Expression Conversions
19.5.1. Exercises: Standard Expression Conversions
19.6. Explicit Conversions
19.7. Safer ANSI C++ Typecast operators
19.7.1. static_cast and const_cast
19.7.1.1. Exercises: static_cast and const_cast
19.7.2. reinterpret_cast
19.7.3. Why not use C-style casts?
19.8. Overloading special operators
19.8.1. Conversion Operators
19.8.2. Vectors and operator[]
19.8.3. The Function-Call operator()
19.9. Runtime Type Identification (RTTI)
19.9.1. typeid operator
19.10. Member Selection operators
19.11. Exercises: Types and Expressions
19.12. Review Questions
20. Scope and Storage Class
20.1. Declarations and Definitions
20.2. Identifier Scope
20.2.1. Default Scope of Identifiers - A Summary
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.4.1. Anonymous Namespaces
20.4.2. Open Namespaces
20.4.3. namespace, static objects and extern
20.5. Review Questions
21. Statements and Control Structures
21.1. Statements
21.2. Selection Statements
21.2.1. Exercises: Selection Statements
21.3. Iteration
21.3.1. Exercises: Iteration
21.4. Exceptions
21.4.1. Exception Handling
21.4.2. Exception Types
21.4.3. throwing things around
21.4.4. try and catch
21.4.4.1. Exercises: try and catch
21.4.5. More about throw
21.4.6. Rethrown Exceptions
21.4.7. Exception Expressions
21.4.8. Exercises: Exceptions
21.5. Review Questions
22. Memory Access
22.1. Pointer Pathology
22.2. Further Pointer Pathology with Heap Memory
22.3. Memory Access Summary
22.4. Introduction to Arrays
22.5. Pointer Arithmetic
22.6. Arrays, Functions, and Return Values
22.7. Different kinds of arrays
22.8. Valid Pointer Operations
22.9. What happens if new fails?
22.9.1. set_new_handler() : Another Approach To new Failures
22.9.2. Using set_new_handler and bad_alloc
22.9.3. Checking for null: new(nothrow)
22.10. Chapter Summary
22.11. Review Questions
23. Inheritance in Detail
23.1. virtual pointers, virtual tables
23.2. Polymorphism and virtual destructors
23.3. Multiple Inheritance
23.3.1. Multiple Inheritance Syntax
23.3.2. Multiple Inheritance with Abstract Interfaces
23.3.2.1. Points of Departure
23.3.3. Resolving Multiple Inheritance Conflicts
23.3.3.1. virtual Inheritance
23.3.3.2. virtual Base Classes
23.4. public, protected, and private derivation
23.5. Review Questions