The errors you have displayed are generated by ROOT. Since this is not a ROOT forum, ROOT is a c++ data analysis framework developed by scientists at CERN. For the curious, their website is here. Your problem however, is not related to ROOT.
2D arrays are declared by
double a[2][2];
and this will work for you.
Perhaps more safe is to use the template class
std::vector<double> v;
For a 2D application this would look like
std::vector<std::vector<double> > v2;
The advantage of this is that its size can be adjusted as needed and
v.push_back(d);
will add an element to the end of the vector, elongating it if necessary. Elements can also be accessed with array syntax like
v[1]
or
v2[1][2]