Lets say that I want a dynamic 2D array, I would do it in following way:

where number_of_points variable is inputed while program runs, and [3] is number of dimensions od space. But what I don't know how to do is, how do I make a [3] also dynamic, for example, if I want to choose a number of dimensions while program is running.Code:double (*koordinates)[3] = new double [number_of_points][3]

I tried:

and it doesn't work.Code:double (*koordinates)[dimension]= new double [number_of_points][dimension] or double (*koordinates)(*dimension)= new double [number_of_points][dimension]