Lecture overview -- Keyboard shortcut: 'u'  Previous page: Common properties of containers -- Keyboard shortcut: 'p'  Next page: A vector specialization: vector<bool> -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Templates and The Standard Library - slide 28 : 39

Container member types

Each standard container defines a number of types - via typedefs

These type definitions serve as standard type names that apply for all container types

mem-types-1.cpp
Illustration of the use of member types for a list of chars.
mem-types-2.cpp
Same program - now with use of typename as prefix of 'nested dependent type names'.
ambiguities-1.cpp
Illustration of a couple of ambiguities.
ambiguities-1-compiler-error-messages
Compiler error messages.
ambiguities-2.cpp
Ambiguities resolved.