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

fill and fill_n

template <class ForIter, class T>    void fill(ForIter start, ForIter end, const T &val);template <class OutIter, class Size, class T>    void fill_n(OutIter start, Size num, const T &val);

The fill( ) and fill_n( ) algorithms fill a range with the value specified by val. For fill( ), the range is specified by start and end. For fill_n( ), the range begins at start and runs for num elements.

Категории