O'Reilly logo

Beginning C++ Programming by Richard Grimes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing Items

The reverse function acts on a range in a container and reverses the order of the items; this means that the iterators must be writeable. The copy and copy_n functions copy every item from one range to another in a forward direction; for copy, the input range is given by two input iterators, and for copy_n, the range is an input iterator and a count of items. The copy_backward function will copy the items, starting at the end of the range, so that the output range will have the items in the same order as the original. This means that the output iterator will indicate the end of the range to copy to. You can also copy items only if they satisfy some condition specified by a predicate.

  • The reverse_copy function will create a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required