home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH15 / A15101.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-11-01  |  288.2 KB  |  1 channel  |  11,025 sample rate  |  26 seconds
Transcription: You can use a function template to define a family of functions that are identical except for the types of one or more of their arguments. A template function is an instance of the template. This example shows a template function that exchanges the values of two objects of the same type. Notice how the type T is used in the list of formal arguments of the function and in the body of the function.