zanerogl

博客园 首页 新随笔 联系 订阅 管理

2022年5月6日 #

摘要: open() read() write() 样例:将旧文件复制为新文件 /** 复制一个文件 **/ #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd 阅读全文
posted @ 2022-05-06 22:42 zanerogl 阅读(132) 评论(0) 推荐(0) 编辑

2022年5月4日 #

摘要: gcc 编译过程 一个C/C++文件要经过预处理(preprocessing)、编译(compilation)、汇编(assembly)和链接(linking)等4步才能变成可执行文件。 gcc hello.c #输出一个a.out的可执行程序; 执行 ./a.out gcc -E hello.c 阅读全文
posted @ 2022-05-04 22:30 zanerogl 阅读(128) 评论(0) 推荐(0) 编辑

2022年4月28日 #

摘要: 如何把指针函数的首地址赋给函数指针? 什么是指针函数? 返回值为某一类型指针的函数 int *(Func)(double a, char *b){ int *p = NULL; return p; } 什么是函数指针? 指向函数的指针变量 int (*p)(double, char); 如何赋值? 阅读全文
posted @ 2022-04-28 10:58 zanerogl 阅读(207) 评论(0) 推荐(0) 编辑