C Programming on the IBM PC (C Programmers Reference Guide Series)

generate and generate_n

template <class ForIter, class Generator>    void generate(ForIter start, ForIter end, Generator fngen); template <class ForIter, class Size, class Generator>    void generate_n(OutIter start, Size num, Generator fngen);

The algorithms generate( ) and generate_n( ) assign elements in a range of values returned by a generator function. For generate( ), the range being assigned is specified by start and end. For generate_n( ), the range begins at start and runs for num elements. The generator function is passed in fngen. It has no parameters.

Категории