摘要: 看以下例子 main.c extern int x; int main() { int y = 100; swap(&x,&y); return 0; } int x = 1; void swap(int* x, int* y) { int temp = *x; *x = *y; *y = temp 阅读全文
posted @ 2023-02-04 22:19 血染河山 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 编译过程拆解 预处理处理生成.i文件, .i文件还是源码文件 将所有的宏定义#define展开。 处理#if, #else, #endif等条件编译指令 处理#include, 原地插入文件 cpp HelloWorld.c > HelloWorld.i可以这样来进行预编译,cpp是C prepro 阅读全文
posted @ 2023-02-04 19:19 血染河山 阅读(577) 评论(0) 推荐(0) 编辑