传递指针参数(函数内部给指针赋值)示例
程序员文章站
2022-04-16 10:18:17
~~~~ include unsigned char ptr = NULL; unsigned char num = 3; static void fun(unsigned char mem) { mem = # } int main() { fun(&ptr); printf("%d \n ......
#include <stdio.h> unsigned char *ptr = NULL; unsigned char num = 3; static void fun(unsigned char **mem) { *mem = # } int main() { fun(&ptr); printf("%d \n", *ptr); return 0; }
上一篇: Pandas模块的学习