#include #include using namespace std; template void Swap(T & a, T & b) { T temp; temp = a; a = b; b = temp; } int main() { int i1 = 123; int i2 = 456; Swap(i1, i2); cout << i1 << " " << i2 << "\n"; string s1 = "ant"; string s2 = "bat"; Swap(s1, s2); cout << s1 << " " << s2 << "\n"; }