基本上我有三个字符**:**A、**B 和 **C。我想制作一个显示 A、B 和 C 的指针,如下所示:
ptr[0] will be **A
ptr[1] will be **B;
ptr[2] will be **C;
因此,如果我在 ptr 处添加一个,它将显示下一个数组。如果这是可能的,那么我如何用指针表示 A[i][j] ?
最佳答案
听起来你想要这样的东西:
char **ptr[] = { A, B, C };
char x = ptr[0][i][j]; // x is now equal to A[i][j]
关于c - C 中不同 char** 的指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8360447/