共用方式為


fill_n (STL/CLR)

Assigns a new value to a specified number of elements in a range beginning with a particular element.

template<class _OutIt, class _Diff, class _Ty> inline
    void fill_n(_OutIt _First, _Diff _Count, const _Ty% _Val);

Remarks

This function behaves the same as the STL function fill_n. For more information, see fill_n.

Requirements

Header: <cliext/algorithm>

Namespace: cliext

See Also

Concepts

algorithm (STL/CLR)