If it's declared statically as above, you can't resize it.
You need to instead use a double ** (pointer to pointer to double, a.k.a. array of arrays of doubles)
1. Free unused rows if x > old x.
2. resize the inner arrays to your new y dimension
3. then resize the main array to your new x dimension.
4. allocate inner arrays towards the end of main array if y > old y.
Or as Oogle suggested, you can use a vector<vector<double>>