I want to pass a multidimensional array to a function. The problem is that the size of the array will only be known at runtime. I know the size of the "inner arrays". The unknown size is that of the "outer" array.
I have tried passing the array in my function prototype by specifying the unknown size as a variable of type int but this resulted in an error. My function prototype looked something like this:
float get_basket(float basket[number][5]);
number above is a global variable of type int.
int **myarray...In your function prototype, the compiler is probably trying to dereference the pointer where it should have a type specification.std::vector. Usestd::vector. Usestd::vector.Usestd::vector. Have I mentioned usingstd::vectoralready? No? You really, really, REALLY should usestd::vector.