![]() |
![]()
| ![]() |
![]()
NAMEstd::array::operator[] - std::array::operator[] Synopsis reference operator[]( size_type pos ); (until C++17)
Parameterspos - position of the element to return Return valueReference to the requested element. ComplexityConstant. Notes Unlike std::map::operator[], this operator never inserts a new
element into the
ExampleThe following code uses operator[] to read from and write to a std::array<int>: // Run this code
Output: Second element: 4
See also at access specified element with bounds checking
|