Skip Navigation Links

Course Length:
5 Days
Course Description:
This course broadens the skills of a C++ language programmer by examining sophisticated C++ concepts such as templates, exceptions, memory management, advanced inheritance issues, disambiguation of overloaded functions, private and protected inheritance, binary I/O and class libraries.
Who Should Attend:
This course is for anybody who has programmed in C++ and wishes to enhance their knowledge of the language.
Benefits of Attendance:
Upon completion of this course, students will be able to:
  • Differentiate between global functions, friend functions and member functions.
  • Code their own memory management routines by overloading operators new and delete.
  • Write classes and functions with parameterized types.
  • Understand and handle exceptions in C++ programs.
  • Disambiguate data and functions using multiple inheritance.
  • Understand the difference between various kinds of inheritance.
  • Use pointers to class member functions.
  • Understand the C++ mechanism to resolve overloaded functions.
Prerequisites:
Students should have completed an introductory C++ programming course or have equivalent knowledge.
Course Outline:
  • Chapter 1: What You Should Already Know - A Review
    1. Rationale for a New Programming Language
    2. The Language of Object-Orientation
    3. A Typical C++ Class
    4. Issues Regarding Member Functions vs. Non-Member Functions
    5. friend or non-friend
    6. Functions Returning References
    7. Relationships
    8. Initialization Lists
    9. Inheritance In C++
    10. Access Levels
    11. Simple C++ I/O
    12. The Many Uses of const
  • Chapter 2: Parameterized Types - Templates
    1. Templates
    2. Overloading Functions
    3. Template Functions
    4. Specializing a Template Function
    5. Disambiguation Under Specialization
    6. Template Classes
    7. Instantiating a Template Class Object
    8. Rules for Template Classes
    9. A Non-Member Function with a Template Argument
    10. Friends of Template Classes
    11. Templates with Multiple Type Parameters
    12. Comments Regarding Templates
  • Chapter 3: Relationships of all Kinds
    1. Uses of Member Initialization Lists
    2. Member Initialization Lists Under Composition
    3. Initialization Lists Under Inheritance
    4. Initialization Lists With Multiple Inheritance
    5. Initialization Lists with Multiple Inheritance and Composition
    6. Efficiency
    7. operator= and Composition
    8. Constructors and Composition
    9. What is not Inherited?
    10. operator=, Construction, and Inheritance
    11. Public Inheritance
    12. virtual Functions
    13. A Shape Class Hierarchy
    14. Polymorphism
    15. Pure Virtual Functions
    16. Abstract Base Classes
    17. Private Inheritance
    18. using Relationships
    19. Associations
  • Chapter 4: Multiple Inheritance (MI)
    1. Multiple Inheritance
    2. Ambiguities
    3. virtual Base Classes
    4. The Dominance Rule
    5. Member Initialization Lists
    6. operator=
  • Chapter 5: Data Structures
    1. Introduction
    2. A Simple List
    3. Layering Type-safe Classes Upon List
    4. A template List Class
    5. Iterators
    6. A template Iterator
    7. Stack and Queue Classes
    8. Templates and Inheritance
  • Chapter 6: Function Pointers
    1. Why Have Function Pointers?
    2. Passing Functions as Arguments
    3. Registering Functions
    4. Function Pointers in C++
    5. Callback Functions
    6. A Class with a Callback Object
    7. Registration of Exception Handlers
  • Chapter 7: Exceptions
    1. What Are Exceptions?
    2. Traditional Approaches to Error Handling
    3. try, catch, and throw
    4. A Simple Exception Handler
    5. Multiple catch Blocks
    6. The Exception Specification List
    7. Rethrowing an Exception
    8. Cleanup
    9. Exception Matching
    10. Inheritance and Exceptions
    11. Resource Allocation
    12. Constructors and Exceptions
    13. Destructors and Exceptions
    14. Catch by Reference
    15. Standard Exceptions
  • Chapter 8: The C++ Standard Template Library
    1. Introduction
    2. The Standard Template Library
    3. Design Goals
    4. STL Components
    5. Iterators
    6. Example: vector
    7. Example: list
    8. Example: set
    9. Example: map
    10. Example: find
    11. Example: merge
    12. Example: accumulate
    13. Function Objects
    14. Adaptors
  • Chapter 9: Disambiguation
    1. Conversion
    2. int Conversion
    3. float + double Conversions
    4. Arithmetic and Pointer Conversion
    5. Inheritance Based Conversion
    6. Overloaded Functions
    7. Exact Match
    8. Match with Promotion
    9. Match with Standard Conversion
    10. User Defined Conversion
    11. Constructors as Conversion Operators
    12. Ambiguities
  • Chapter 10: I/O
    1. Introduction
    2. Manipulators
    3. Writing Your Own Manipulators
    4. Overloading the I/O Operators
    5. Disk Files
    6. Reading and Writing Objects
    7. Internal Transmission of Data
    8. A Spell Checker
    9. Handling Streams in the Constructor and Destructor
    10. Treating a File as an Array
    11. Example
  • Chapter 11: Miscellaneous Topics
    1. Namespaces
    2. Use Counts
    3. Reference Counts
    4. RTTI
    5. Casts
    6. Having a Limited Number of Objects
    7. Smart Pointers