You can’t dynamically create a 3-dimensional array where the memory is contiguous. (Well, there’s a bit of a trick where you can sort of do this.) glMap2f requires the memory to be contiguous.
A few options you can use:
Create a single dimension array, and calculate the indices yourself. (If you do this, then you can set your dynamic 3d array to point to the appropriate address locations of the 1d array, which is the trick I mentioned above.)
Create a struct with 3 floats and make an array of that struct.