#include template void scambia(T& x, T& y) { T tmp = x; x = y; y = tmp; } int main() { int i = 10; int j = 20; cout << "Prima: " << i << "\t" << j << endl; scambia(i, j); cout << "Dopo: " << i << "\t" << j << endl; float x = 10.2; float y = 20.3; cout << "Prima: " << x << "\t" << y << endl; scambia(x, y); cout << "Dopo: " << x << "\t" << y << endl; char a = 's'; char b = 't'; cout << "Prima: " << a << "\t" << b << endl; scambia(a, b); cout << "Dopo: " << a << "\t" << b << endl; return 0; }