The function copy is used to copy a range.
template<class InputIterator, class OutputIterator> OutputIterator copy(InputIterator first, InputIterator last,OutputIterator result);
The position of the last copied element is returned.