public member function
<array>
std::array::fillvoid fill (const value_type& val);
Fill array with value
Sets val as the value for all the elements in the array object.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// array::fill example
#include <iostream>
#include <array>
int main () {
std::array<int,6> myarray;
myarray.fill(5);
std::cout << "myarray contains:";
for ( int& x : myarray) { std::cout << ' ' << x; }
std::cout << '\n';
return 0;
}
myarray contains: 5 5 5 5 5 5
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4