I am trying to pass a 2 dimensional array to a function that takes a pointer to a pointer. And I found out that the 2nd array is not a pointer to a pointer (a pointer to a 1-D array). When I compile the code below, I got this error.
#include<iostream> void myFuntion(int **array) { } int main() { int array[][]= {{1,2,3,4},{5,6,7,8,9},{10,11,12,13}}; myFuntion(array); return 0; }
In the 'int main ()' function: Line 5: error: declaring the array as a multidimensional array must have boundaries for all dimensions except the first compilation is completed due to -Wfatal-errors.
Someone can explain my doubts about this and some documents, if possible, for my big doubts.
source share