Simple newbie question:
I want to set an int array to value 5
int i[3];
int val=5;
std::uninitialized_fill(&i[0], &i[3], val);
OR
std::uninitialized_fill(i, i+3, val);
I need to pass as last iterator an out of index reference to completly fill
the array.
I think because std::uninitialized_fill do something like "while ( First !=
Last ) {...do something...}"
So my iterator will be incremented out of index? Is it dangerous?
Many thanks
Michele