Each container class includes several typedefs that create a set of standard type names. - C++ STL

C++ examples for STL:Introduction

Introduction

Several of these typedef names are shown here:

Type Description
size_type Some type of unsigned integer.
referenceA reference to an element.
const_reference A const reference to an element.
iterator An iterator.
const_iterator A const iterator.
reverse_iterator A reverse iterator.
const_reverse_iterator A const reverse iterator.
value_type The type of value stored in a container. Same as T for sequence containers.
allocator_type The type of the allocator.
key_type The type of a key.

Related Tutorials