void printTable(char (*tacToe)[3], int row, int col){
}
void initTable(char (*tacToe)[3], int row, int col){
}
int main(void){
char tacToe[3][3];
initTable(tacToe, 3, 3);
printTable(tacToe, 3, 3);
}
here is my question. what is the difference between *ary[] and (*ary)[]?
when i did the program initially like so:
void printTable(char *tacToe[3], int row, int col){
}
void initTable(char *tacToe[3], int row, int col){
}
int main(void){
char tacToe[3][3];
initTable(tacToe, 3, 3);
printTable(tacToe, 3, 3);
}
it does not work. now, from my understanding, but mainly just some guessing, is that (*ary)[] is declaring an array of pointers, while *ary[] is declaring a pointer to an array? when i thought about it, it should be pretty much, if not completely the same.
is it not that the name of the pointer array points to the first pointer in the array while the pointer to an array is well pretty much the same since an array is a pointer as well.