C++ Standard Library rotate_copy() Sample

Description

rotate_copy() considers its element sequence to be circular, and rotates it such that the specified middle element is placed where the first element used to be. The rotated sequence is placed in the output, and the input sequence is unchanged.

Declaration

	template <class For, class Out>
	    Out rotate_copy(For, For, For, Out);

Concept

The sample program sets up a vector of strings, and rotates it two positions. The result is inserted into a vector<string> structure. The output is:

	peach
	apple
	orange

Supported
Supported
Supported