template模板
#include "stdafx.h"
#include<iostream>
using namespace std;
template <typename T>
void swap(T &a, T &b)
{
T temp = a;
a = b;
b = temp;
}
void main()
{
int num1 = 100;
int num2 = 10;
std::swap(num1, num2);
cout << num1 << " " << num2 << endl;
char a = 'z';
char b = 'd';
std::swap(a, b);
cout << a<<" "<<b << endl;
}