The swap function
template<class T>void swap(T& x, T& y)
{
T temp = x;
x = y;
y = temp;
}
Previous slide
Next slide
Back to first slide
View graphic version