Prev Up Next
Go backward to 9/4/2001   A Further Look at C++ Function Templates, Focusing on Specialization and Overloading
Go up to News Archive
Go forward to 8/30/2001   Ghostview Download Site Recommended

8/31/2001   STL Viewed as a Prime Example of Generic Programming

 AP Wire Service

The slides used in the presentation in today's class include

Look especially at the latter half of these slides, which we did not discuss in class today.

We also looked at some issues with C++ function templates, based on the sample code

Save the second file to a local directory and continue modifying it and checking with a compiler (or more than one compiler) your answers to the questions. Usually, though, one can't base definitive answers just on the results of compiling. Even assuming the compiler your using is correct (not always the case), the special case you are testing may not be representative of the general rules defining the language. So get in the habit of approaching questions like these with an arsenal of tools and resources: one or more (up to date) compilers, one or more (up to date) textbooks, and--most authoritative, if not always easy to understand--the C++ Standard.


 

Prev Up Next