Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 28s8 days 9 hours 54 minutes 28 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 28s8 days 9 hours 54 minutes 28 seconds.

Sign in to watch this lesson
Templates and Generic Programming · 4:04
A class template turns a type into a parameter: one recipe, and the compiler stamps out a real class for every type you use. We instantiate Vector for char, string and list, find the separate constructors in the object file, put values in template parameters to avoid the heap, and catch the string-literal trap in class template argument deduction.