September 2014
Intermediate to advanced
396 pages
7h 58m
English
CHAPTER 15
![]()
Introduction to Templates
Even for practical purposes, theory generally turns out the most important thing in the end.
—Oliver Wendell Holmes
In the previous chapter, we saw what you could do with C++/CLI generics. In this chapter, I will introduce templates, which are similar to generics in many ways and different in many others.
Comparison with Generics
Templates and generics both allow you to create functions and classes that implement functionality for multiple types. We can approach this in one of two ways:
Read now
Unlock full access