u are defining a generic algorithm or data
structure, how do you specify the methods that the
user must provide?</p>

<p>Clearly this could be done by writing comments all over the place or
writing documentation that specifies the methods and their parameters. Of
course, the documentation of the generic software should indeed contain such
information. However, a better solution is one which is expressed in C++ so
that the interface can be seen in a header file and which enables a compiler
to do some consist