Templates are an important part of C++ that allows a programmer to reuse existing code for new purposes. In some sense, templates ensure that you don’t have to continually “reinvent the wheel.” This lecture introduces how to implement and use template functions. The best time for the lecture is just before the students read chapter 6. |