#include <algorithm> void generate( iterator start, iterator end, Generator g );
The generate() function runs the Generator function object g a number of times, saving the result of each execution in the range [start,end).