S
snnn
How to pass a 2-dimension array to a function ?
How to write the decleartion of the function?
e.g.
int a[10][10];
I want to pass a to a function "func".
I wrote
void func(int a[][]); //error.
void func(int** a); //wrong type...
and,if a is a 1-deimension array like
int a[10];
what the type of a£¿
a is a point to an int value but not "int*" ?
const int*£¿
int const*?
int*¡¡const?
sorry,who can help me?
thanks!
How to write the decleartion of the function?
e.g.
int a[10][10];
I want to pass a to a function "func".
I wrote
void func(int a[][]); //error.
void func(int** a); //wrong type...
and,if a is a 1-deimension array like
int a[10];
what the type of a£¿
a is a point to an int value but not "int*" ?
const int*£¿
int const*?
int*¡¡const?
sorry,who can help me?
thanks!