Bidimensional array container

Hi,

I need to create an array container with the same structure as double myA [100][100];. But I cannot declare it as array<double, 100, 100> myA; however I do need this container for its format. How can I make it work, please? Thanks in advance.
array<array<double, 100>, 100> myA;
std::array<std::array<double,100>,100> myarray ; ?
Oh? Thanks! Are you sure this will give exactly the same data structure as double myA [100][100];? It looks a bit weird...
Last edited on
std::array can, as far as I know, contain padding so you are not guaranteed that all 10000 doubles will be stored contiguous in memory.
std::array< double[100], 100 > a { { {0} } } ;
Thanks for all the replies!
Topic archived. No new replies allowed.