Заполнить (Fill)

We use cookies. Read the Privacy and Cookie Policy

Заполнить (Fill)

template ‹class ForwardIterator, class T›

void fill(ForwardIterator first, ForwardIterator last, const T& value);

template ‹class OutputIterator, class Size, class T›

OutputIterator fill_n(Output Iterator first, Size n, const T& value);

fill присваивает значения через все итераторы в диапазоне [first, last) или [first, first+n). fill_n возвращает first+n. Точно делается last - first (или n) присваиваний.