#include<stdio.h> void f(char *******p) { char *str1 = "abc"; char *temp = NULL; temp = (char *)malloc(10*sizeof(char)); memset(temp, 0, 10); strcpy(temp, str1); //*temp = 10; *p = temp; } void main() { char ******p1=NULL; char *******p2=NULL; p2 = &p1; f(p2); printf("%s", p1); system("pause"); }
原文地址:http://blog.csdn.net/han1558249222/article/details/24850989