Generic programs

4/18/99


Click here to start


Table of Contents

Generic programs

C++ Standard Library

Using the library

Review

A simple example

Algorithms & containers

Alternatives

Containers with unknown
size

Solving the homework

The hard part

More of the hard stuff

The rest of the hard stuff

The easy part

A word-processing example

Block indented

Space indented

Strategy

The code

Destructive operations

Another approach

Use iterators instead

One subtlety

Using List Instead

Why bother?

Another example

The map class

First, a simpler problem

Printing the contents

Printing the map

Strategy for X-ref

Variables

Read the input

Library functions

Print the vector

Homework

Author: Barbara Moo

Email: bmoo@worldnet.att.net