I am trying to understand how to use pointers with multidimensional arrays (E.g: 2 dimensions, 3 dimensions...). I saw a lot of resources online for it, but I still can't seem to understand it. The syntax is also throwing me off. What do these following syntaxes mean (Why do we need parenthesis)? What does the code do and how does it work? Thank you!
Example 1
int (*array)[5] = new int[10][5];
Example 2
int c[3][2][2];
int (*p)[2][2] = c;
int *array[5];definesarrayas an array of five pointers toint.int (*array)[5];definesarrayas a pointer to an array of fiveintvalues.