#include <stdio.h> #include <stdlib.h> void pointer(int **x); int main() { int a=10; int *p=&a; pointer(&p); printf("%d",*p); return 0; } void pointer(int **x) { int b=20,*q; q=&b; x=q; //不可这样书写,因为类型不匹配;可以写成*x=q; } int main(void) { char str[]="abcdefg"; char **p; p=str; //不可以这样编写,str是char[]类型 ,p是char **类型;改成char *str[]={"abc","def"} }
本文出自 “阳子” 博客,请务必保留此出处http://9832751.blog.51cto.com/9822751/1698242
原文:http://9832751.blog.51cto.com/9822751/1698242