KilluaZoldyck 2019-12-31
定义:int **p;
实例:
#include<stdio.h> #include<iostream> int main() { char* str[] = { "hello","hi","nihao" }; char** p; for (int i = 0; i < 3; i++) { //指针指向数组中的第几个指针 p = str + i; //想要获得指针指向的值,通过*来解引用 printf("%s\n", *p); } system("pause"); return 0; }
输出: