They sort an array of integers – before we carry on, make sure you understand how it does it.
Now suppose we want to sort an array of doubles, or characters, or any other object – what would we need to do? Looking at the above functions the word ‘int’ is used 3 times when indicating the type of the value stored
in the array – identify them! These three instances can each be replaced by a template class and it will make the same code usable for arrays of several different types. In fact it will make the functions usable by an array of any type so long as they have the assignment ‘=’ and ‘