Home C++ Introduction Decisions Loops Input/Output Functions Stack and Heap References Arrays Searching and Sorting Pointers Character and Strings Structures Classes Inheritance Exceptions Templatess Recursion STL Modern C++ Misc Books ----

Templates


Contents

Introduction

Templates allow us to specify a class parameter to a function or a class. We are used to passing parameters that are primitive types such int, float or class types such as string. With templates the type itself is a parameter and we can pass different types. This allows us a great deal of flexibility in writing our functions and classes. Template are used heavily in the STL( Standard Template Library ) .