Defined in header <algorithm> template< class OutputIt, class Size, class Generator >
void generate_n( OutputIt first, Size count, Generator g ); (until C++11) template< class OutputIt, class Size, class Generator >
OutputIt generate_n( OutputIt first, Size count, Generator g ); (since C++11)
Assigns values, generated by given function object g, to the first count elements in the range beginning at first, if count>0. Does nothing otherwise.
Parameters