Advance Your Skills in Legacy C++

An Effective Introduction to the STL

Details of this On-Site C++ Training for Programmers
Presented by Leor Zolman

A 4-Day Course of Lectures and Lab Exercises


Who Should Attend:

  • Experienced C++ programmers who are interested in learning what the STL has to offer.
  • Experienced C++ programmers who are interested in generic programming.

Prerequisites:

This course is designed for those already familiar with the object-oriented aspects of C++. No prior STL experience is required, but familiarity with the basics of C++ template syntax is recommended.


Supplied Materials:

  • All printed course notes are provided in printed form and also in PDF format on CD-ROM or USB stick, along with sample programs, lab building blocks/solutions and other bonus materials.
  • A copy of Leor Zolman's STL Error Decryptor program. This tool transforms lengthy, difficult-to-understand STL diagnostics into short, readable error messages to facilitate learning the STL. The tool works with Microsoft Visual C++ 6/7 under both the IDE and command-line development environments, Comeau C++, Metrowerks CodeWarrior 7/8, Intel C++, Borland C++ and gcc 2/3

Course Outline:

  • Concepts and Architecture of the STL:
    • Arrays and pointers, half-open ranges
    • Generalizing pointers to iterators
    • Generalizing arrays to sequences
    • Algorithms
    • Conventions and extensibility
    • Function objects
    • STL headers
    • iterators vs. const_iterators
    • Thread safety and the STL
    • Exercises

  • Containers I: Introduction and Sequence Containers:
    • Overview of containers and container adapters
    • Containers and iterator invalidation
    • Universal container functionality
    • vector and string
      • size, capacity, "the swap trick," and "shrink to fit"
      • vector operations
      • Using vector with C APIs
      • vector<bool>
      • string functionality
    • deque functionality
    • list functionality
    • Exercises

  • Containers II: Associative Containers:
    • Comparison functions
    • Equality vs. equivalence
    • std::pair
    • Search functionality: find, count, lower_bound, upper_bound, equal_range
    • Insertion and erasure
    • In-place element modification
    • Sorted vectors as an alternative to associative containers
    • Exercises

  • Iterators
    • reverse_iterators and const_reverse_iterators
    • Stream iterators
    • C++'s most vexing parse
    • Insert iterators
    • Iterator categories
    • Iterators vs. pointers
    • Exercises

  • Function Objects and Adapters:
    • bind1st, bind2nd, not1, not2
    • The unary_function and binary_function base classes
    • ptr_fun, mem_fun, mem_fun_ref
    • Overview of standard function objects (e.g., less<T>)
    • Exercises

  • Algorithms:
    • Overview of types of algorithms
    • Algorithms vs. same-named member functions
    • Detailed looks at for_each, transform, remove
    • Overview of searching algorithms
    • Overview of reordering algorithms
    • Overview of modifying algorithms
    • Overview of removing algorithms
    • Overview of copying algorithms
    • Overview of creation algorithms
    • Overview of summarizing algorithms
    • Exercises

  • Common STL Extensions:
    • Hashed associative containers
    • slist
    • rope
    • SGI adapters: compose1, compose2, select1st, select2nd, etc.
    • Exercises

  • Further Reading

Format:

Lectures and labs

Length:

4 full days

Contact Us | Pricing | Copyright © 2024 by Leor Zolman | Links