#include template void Swap(Type& one, Type& another); int main() { int N = 5, M = 10; Swap(N, M); printf("N = %d, M = %d\n", N, M); double dN = 5.0, dM = 10.0; Swap(dN, dM); printf("dN = %f, dM = %f\n", dN, dM); return 0; } template void Swap( Type&, one, Type& another) { Type temp; temp = one; one = another; another = temp; }