C语言
嵌入式DZC
活到老,学到老
展开
-
Makefile的编写规则
程序执行过程:预处理,编译,汇编,连接,运行 ESC OSI .c ---.i .i-----.s .s------.o .o------.out (文件名为Makefile 无后缀,#是注释) 显示规则 目标文件:依赖文件 (tab)指令: &第一个目标文件就是最后生成的文件 hello:hello.o gcc hello.O -o hello hello.o...原创 2022-04-04 20:00:35 · 387 阅读 · 0 评论 -
简单 字符串转换为整数atoi(C语言)
long long atoi(char* str) { long long ret = 0; if (str == NULL || *str == '\0') return -1; //标记是正数还是负数 int flag = 1; //前面是空格 while (*str == ' ') str++; if (*str == '-' || *str == '+') { if (*str ==.原创 2022-04-03 23:10:50 · 248 阅读 · 0 评论