This is my mini-C++ website.
Some of my favourite books
Various C++ links.
A bunch of short articles I've written. The article on polymorphism
is done, the others are incomplete.
- Stupid tricks: just some random thoughts.
Topics include adding member-templates to functors like
plus,multiplies,divides, and using recursive templates to implement
- Linked list HOWTO
A discussion on the topic of implementing a linked list
- The standard library
An introduction to the standard C++ library.
This tutorial is recommended for beginners.
- Random numbers
Most textbooks give some explanation of how to generate random
Unfortunately, several of the idioms that are used in textbooks
are either flawed or just plain wrong. This article covers some
examples and discusses potential pitfalls.
This article is suitable for beginners, but also recommended for
intermediate programmers (who have probably been taught incorrectly)
- Polymorphism: a brief introduction to
polymorphism. In my experience, many students and even instructors
understand polymorphism well. This is for those who've seen
inheritence and new but are still trying to grasp
Arrays are not pointers
A discussion on arrays, multi-dimensional arrays, and the differences
between arrays and pointers.
- Templates: some solutions to some problems
I used to find very annoying.
- Registration and the prototype pattern: a powerful technique to decouple derived classes from
- Envelopes and Letters: a technique used
to bring runtime polymorphism to objects in automatic storage.
- Envelopes, Letters, and Prototypes a
This example combines envelopes and letters with the prototype pattern.