std::copy() is pretty simple. Here's an example:
Code:
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
int nums[5] = { 1, 2, 3, 4, 5 };
cout << "Original set:" << endl;
for ( int i = 0; i < 5; ++i )
{
cout << nums[i] << endl;
}
// Just give it the first and last elements you want to copy, as well as the location where to copy them to.
copy( &nums[1], &nums[5], &nums[0] );
nums[4] = 0;
cout << endl << "New set:" << endl;
for ( int i = 0; i < 5; ++i )
{
cout << nums[i] << endl;
}
return 0;
}