摘要: #include <stdio.h> #include <stdlib.h> #include <math.h> // #include <time.h> #include <sys/times.h> #include <stdbool.h> #define SIZE 16 struct size_ 阅读全文
posted @ 2022-05-13 20:12 starc的miao 阅读(44) 评论(0) 推荐(0)
摘要: 可参考下面链接中介绍的方法,配置需要的设置项 https://www.cnblogs.com/brucemengbm/p/6709450.html set encoding=UTF-8 set langmenu=zh_CN.UTF-8 set fileencodings=ucs-bom,utf-8, 阅读全文
posted @ 2022-05-13 19:05 starc的miao 阅读(30) 评论(0) 推荐(0)
摘要: 独占方式创建文件 文件尾部追加数据 阅读全文
posted @ 2022-05-13 18:15 starc的miao 阅读(37) 评论(0) 推荐(0)
摘要: Makefile视频教程 跟我一起写makefile 如何编写Makefile文件 main.c #include <stdio.h> #include <stdlib.h> #include <math.h> int main(void) { int i; i = 8; printf("data= 阅读全文
posted @ 2022-05-12 22:49 starc的miao 阅读(144) 评论(0) 推荐(0)
摘要: 打开SSH 使用以下命令开启、关闭、重启ssh服务: systemctl status sshd.service # 检查SSH服务有没有启动 systemctl start sshd.service #启动ssh服务 systemctl restart sshd.service #重启ssh服务 阅读全文
posted @ 2022-05-12 22:22 starc的miao 阅读(357) 评论(0) 推荐(0)
摘要: command 代码高亮 syntax on/off 设置行号 set number 自动配置文件 vim ~/.vimrc 跳转行号 88 gg 7 k/j 查找 /str N shift + N set nohlsearch 按字跳转 W / B 删除 CC / C2C 取消 U 粘贴 P 赋值 阅读全文
posted @ 2022-05-12 19:30 starc的miao 阅读(61) 评论(0) 推荐(0)
摘要: 命名规则 最短长度 & 最大信息量 每个单词首字母大写 避免数字编号 变量用大写字母隔开,宏定义、只读常量全部大写,下划线隔开 register 因寄存器数量有限,所以数据优化到寄存器的变量有限,而不是放在内存中。 因为变量不是放在内存中,所以不能用取址运算符 & 来获取register变量的地址。 阅读全文
posted @ 2022-05-10 01:23 starc的miao 阅读(48) 评论(0) 推荐(0)
摘要: 这些函数包含在<stdlib.h>头文件中 malloc int* p = (int*)malloc(100 * sizeof(int));//最好能强制类型转换 malloc是申请空间 free是释放空间 他俩需要成对出现 calloc *void calloc( size_t num, size 阅读全文
posted @ 2022-05-06 20:27 starc的miao 阅读(127) 评论(0) 推荐(0)
摘要: 函数定义总览 结构体定义 函数代码示例 代码 // 创建和获取 ipc 内核对象 int msgget(key_t key, int flags); // 将消息发送到消息队列 int msgsnd(int msqid, const void *msgp, size_t msgsz, int msg 阅读全文
posted @ 2022-05-03 10:15 starc的miao 阅读(34) 评论(0) 推荐(0)
摘要: 概念 管道读写特点 管道的局限性 创建管道函数pipe 读写管道函数read/write 等待子进程中断或结束的函数wait 使用管道的特殊情况 创建无名管道 /* 创建无名管道,创建子进程 */ void pipe_func(void) { int res; int num; pid_t pid; 阅读全文
posted @ 2022-05-03 10:14 starc的miao 阅读(38) 评论(0) 推荐(0)