慕的地10843
一种用途是从函数内部更改指针的值。例如:#include <stdio.h>void swapStrings(const char **strA, const char **strB){ const char *tmp = *strB; *strB = *strA; *strA = tmp;}int main(){ const char *a; const char *b; a = "hello"; b = "world"; swapStrings(&a,&b); // now b points to "hello" and a points to "world" printf("%s\n", a); printf("%s\n", b);}输出:worldhello