📜  2d stl 数组 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:55.806000             🧑  作者: Mango

代码示例1
/*
std::array is 1-dimensional, there is no such thing as a 2-dimensional std::array.
You would simply have to use an inner std::array as the element type of an outer 
std::array, eg:
*/
#include 
#include 

int main(){
  std::array,4> myarray;
  for (int i=0; i<5; i++){
    for (int j=0; j<10; j++){
      myarray[i].at(j) = j+1;    
    }
  }
}