//File: template.cpp #include #include using namespace std; namespace bill { template void swap (T &a, T &b) { T temp = a; a = b; b = temp; } } int main () { int x=12, y=5; string s("HI"), t("THERE"); cout << "First number is: " << x << endl; cout << "Second number is: " << y << endl; cout << "First string is: " << s << endl; cout << "Second string is: " << t << endl; bill::swap (x, y); bill::swap (s, t); cout << endl; cout << "First number is: " << x << endl; cout << "Second number is: " << y << endl; cout << "First string is: " << s << endl; cout << "Second string is: " << t << endl; return 0; }