1/*
2std::array is 1-dimensional, there is no such thing as a 2-dimensional std::array.
3You would simply have to use an inner std::array as the element type of an outer
4std::array, eg:
5*/
6#include <iostream>
7#include <array>
8
9int main(){
10 std::array<std::array<int,5>,4> myarray;
11 for (int i=0; i<5; i++){
12 for (int j=0; j<10; j++){
13 myarray[i].at(j) = j+1;
14 }
15 }
16}
17