参考1: https://www.cnblogs.com/reality-soul/p/6372915.html
void fun(void)
{
int tmp = 0;
change(tmp);
printf("################ tmp = %d /n");
return ;
}
void change(int tmp_t)
{
tmp_t =1;
return;
}
void fun(void)
{
int tmp = 0;
change(&tmp);
printf("################ tmp = %d /n");
return ;
}
void change(int *tmp_t)
{
*tmp_t =1;
return;
}
int fun(void)
{
int *buf ;
int ret ;
ret = mem_init(&buf);
return ret;
}
int mem_init(int **buf_t)
{
*buf_t = malloc(100);
return 1;
}
参考2: https://blog.csdn.net/qq_44358197/article/details/90812372