Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
You can do this
void func( int (*arr) );
The important thing to remember is that in c++ multidimensional arrays are squashed into a single dimensional array. So x is translated to *( x + 1 * 3 + 2 )
So actually these things mean nothing without the full dimensions. Really you only need the second dimension, so actually I think:
int (*arr); is legal and the outer dimension can be indeterminate.
But these are not arrays of pointers to arrays, and the parenthesis around the name is how the syntax separates arrays of pointers and pointers to arrays
Let me know if you have questions
xjose97x15Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
sam966912Hats off to this lady .... I would have just flipped the machine