First page Back Continue Last page Graphics
Function Template (cont.)
- template < typename Any >
- void Swap (Any &a, Any & b)
- {
- Any temp;
- temp = a;
- a = b;
- b = temp;
- }
Any is not a valid type, but if you substitute a valid type for all Anys, it makes sense!
Can use class instead of typename.