char * (*arr)[2]
和 char **array[2]
有何不同??如果我使用函数传递 char* strings[2]
那么如何从问题第一部分提到的两种方式访问元素?
还请告诉其他访问指针数组元素的方法。
谢谢。
最佳答案
CDecl报告:
char *(*arr)[2]
declare arr as pointer to array 2 of pointer to char
和
char **arr[2]
declare arr as array 2 of pointer to pointer to char
只是 []
数组声明符的优先级高于 *
指针限定符,所以括号改变了含义。
关于c++ - char * (*arr)[2 ] 和 char **array[2] 有何不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18575577/