p是指向char*的指针变量
循环时,p=a+i ,*p是a[i]的值
#include<stdio.h>
int main()
{
char *a[]={"abc","def","poi"};
char **p;
int i;
for(i=0;i<3;i++)
{
p=a+i;
printf("%s\n",*p);
}
}
p是指向char*的指针变量
循环时,p=a+i ,*p是a[i]的值
#include<stdio.h>
int main()
{
char *a[]={"abc","def","poi"};
char **p;
int i;
for(i=0;i<3;i++)
{
p=a+i;
printf("%s\n",*p);
}
}