DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

fill(C++)


fill -- assign a given value to all locations in an array

Synopsis

   template <class T>
   void fill(const T& val,T* b,T* e);

Assumptions

(C) T has operator=.

Description

Assigns the value val to every location in the array.

Complexity

If N is the size of the array, then complexity is O(N). Exactly N assignments are done.

Notes

Because a Block (see Block(3C++)) can always be used wherever an array is called for, Array Algorithms can also be used with Blocks. In fact, these two components were actually designed to be used together.

References

Array_alg(C++), for_each(C++), generate(C++), subs(C++), Block(C++)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005