Fill and Create Ranges
Next in the line of modifying algorithms, we have the 'fill' and 'generate' functions.
You can fill a range with std::fill
and std::fill_n
; you can generate new elements with std::generate
and std::generate_n
.
fill
: Fills a range with elements: