* Michael Grosseck wrote:
>funktioniert das auch. Nun möchte ich aber eine Templatefunktion daraus
>machen.
>z.B. template <class T> void Swap(T a, T b)
#include <iostream>
template <class T>
void Swap(T & a, T & b) {
T t;
t = a;
a = b;
b = t;
}
int main(void) {
int a(4),b(7);
cout << "a=" << a << endl
<< "b=" << b << endl;
Swap(a,b);
cout << "a=" << a << endl
<< "b=" << b << endl;
return(0);
}