L25STL - Standard Template Library Iterators and Containers...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Standard Template Library Iterators and Containers
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Why STL tasks like implementing a (templated) list of elements arise often in programming practice a library of templated classes that provide a set of templates for common tasks and ways of manipulating them is a part of C++ it is called Standard Template Library (STL) two main constructs containers – (templated) classes that simplify data manipulation iterators – ways of accessing elements containers
Background image of page 2
sequence containers – element access by position in container vector – indexed access to any element, quick insertions of elements in back only deque – indexed access, quick insertion/deletion from front/back list – sequential access only, quick insertion/deletion anywhere associative containers – element access by value (will not study) example: set - rapid lookup of elements, no duplicates allowed container declaration syntax: container_class <type_parameter> container_name; where container_class - vector, deque, list, etc. type_parameter- type/class of elements
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/22/2010 for the course CS 23021 taught by Professor Staff during the Spring '08 term at Kent State.

Page1 / 11

L25STL - Standard Template Library Iterators and Containers...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online