A
Andrew Koenig
int *graph = new int[16];
std::fill(graph, 16, 0);
std::fill_n(graph, 16, 0);
or
std::fill(graph, graph+16, 0);
Right you are. I posted too quickly after noting the following text in the
standard:
template<class ForwardIterator, class T>
void fill(ForwardIterator first, ForwardIterator last, const T&
value);
template<class OutputIterator, class Size, class T>
void fill_n(OutputIterator first, Size n, const T& value);
and missed the _n in the second declaration. That's what I get for not
compiling my examples