1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
hi(merge)
itemization(
it() Header file: tt(<algorithm>)
it() Function prototypes:
itemization(
itt(OutputIterator merge(InputIterator1 first1, InputIterator1
last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result);)
itt(OutputIterator merge(InputIterator1 first1, InputIterator1
last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result,
Compare comp);)
)
it() Description:
itemization(
it() The first prototype: the two (sorted) ranges rangett(first1,
last1) and rangett(first2, last2) are merged, keeping a sorted list (using the
ti(operator<) of the data type to which the iterators point). The final
series is stored in the range starting at tt(result) and ending just before
the tt(OutputIterator) returned by the function.
it() The second prototype: the two (sorted) ranges rangett(first1,
last1) and rangett(first2, last2) are merged, keeping a sorted list (using the
boolean result of the binary comparison operator tt(comp)). The final series
is stored in the range starting at tt(result) and ending just before the
tt(OutputIterator) returned by the function.
)
it() Example:
verbinclude(-a examples/merge.cc)
)
|