split your cpp code into multiple files
How to split main.c into .h and .c files This post is updated on July 29, 2024, with cotent as below: For a C project which has directory as below: ├── CMakeLists.txt ├── README.md └── main ├── CMakeLists.txt └── main.c How to split the main.c into me.h and me.c and let all the declarations and definitions be in the .h and .c file respectively? 1. Understand the process of compilation and linking 1.1 Pre-processing 预处理 在编译开始之前,预处理器会处理代码中的预处理指令,比如 #include、#define 和条件编译指令 (#ifdef、#endif 等)。
…