How do you declare an array of arrays in C++?

I have 2D arrays that represent matrices. I want these to be in an array so that I can create a loop to run each through a function. I figured I could just declare it as

array matrices[4] = {m1, m2, m3, m4};

when I do, visual basic says, "argument list for class template std::tr1::array is missing"
Last edited on
Visual Basic? Pick one, this is a C++ forum.
Generally, you use a dedicated matrix class or for a temporary solution, a vector of a vector:
vector<vector<int> > matrix(width,vector<int>(height));
Sorry, I meant visual studio haha
Topic archived. No new replies allowed.