> int N = 15; // chosen arbitrary rank
> vector<vector<vector<...<vector<double>>>>..> vec; // N layers of nested vectors
And how many elements do you plan to store in each dimension?

With just...