C++ Standard Library iter_swap() Sample

Description

iter_swap() is similar to swap(), and is used to swap elements referred to by their iterators.

Declaration

	template <class For, class For2>
	    void iter_swap(For, For2);

Concept

The sample sets up an integer vector, and then swaps the first two elements. The first element is referenced by the iterator vec + 0, and the second by vec + 1.

Supported
Supported
Supported