Kak 5 Using the Container Classes
5.1 Container Classes in C++
See
Standard Template Library (STL) container classes.
A container is an STL template class that manages a sequence of
elements. Such elements can be of any object type that supplies a copy
constructor, a destructor, and an assignment operator.
The STL template container classes include:
The
Standard C++ Library template class basic_string also meets the
requirements for a template container class.
VectorBasic.cc
VectorFrontBackResize.cc
5.1.1.1 List Operations on Vectors
VectorInsertEraseSort.cc
5.1.1.2 Vector of Class Type Objects
VectorForClassType.cc
5.1.1.3 Using an Array to Initialize a Vector
VectorInitArray.cc
DequeFront.cc
ListOps.cc
StackOps.cc
QueueOps.cc
5.1.6 Priority Queue
PriorityQueueOps.cc
MapHist.cc
SetOps.cc
5.2 Containers in Java
See
Java Collections Framework Overview.
See also:
tutorial on Java Collections.
5.2.1 List
ListOps.java
5.2.2 Set
SetOps.java
5.2.3 Map
MapHist.java
5.2.4 Vector
VectorOps.java
VectorListOps.java
5.4 Homework
problem 2
VectorDest.cc
problem 3
VectorDestOrder.cc
Maintained by John Loomis,
last updated 2 Jan 2007