Specifically for more than 2 dimensions.
How to pass and return multidimensional arrays in function cpp?
void dummy(int d[][3][3])
{
d[1][1][1] = 0;
}
then how to return an array from a function?
the return type of the function should be a triple pointer in case of 3d array or double pointer in case of 2d array and declare your array in the function body and just write (return function-name)
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.