I am trying to create a simple 2D array with the size being the parameters passed by the method. In C# we would have something like this:
float[,] GenerateNoiseMap(int mapWidth, int mapHeight){
float noiseMap[,] = new float[mapWidth, mapHeight];
return noiseMap;
}
Any idea how I can create a 2D array and return it in C++? So far the compiler gives me an error that the size has to be a constant value, and I want the values to be what the method parameters are