关于基址!头都大了!
我理解指针,但到了汇编,对于基址,什么一级基址的,头大!!!
别急~~~~~~~
慢慢理解~
#include <stdio.h> char ** i_array(int &i, char **(*x1)(char *, char **)); char ** (*d)(int &i, char **(*x1)(char *, char **)); char **c_x1(char *, char **); int main(void) { int a = 1; char **p1; d = i_array; p1 = (*d)(a, c_x1); //这行输出程序爆了。 printf("看看有没有返回p所指向的地址:%s\n", *p1); return 0; } char **i_array(int &i, char **(*x1)(char *c1, char **c2)) { char **p; char *c = "abc"; printf("输出引用的值1出来看看:%d\n", i); p = (*x1)(c, &c); printf("看看出不出的得Test字符串:%s\n"); return p; } char **c_x1(char *c1, char **c2) { char *p = "Test"; char **p1 = &p; printf("c1:%s\n", c1); printf("c2:%s\n", *c2); return p1; }