preprocessing command in c language

The preprocessing of C language mainly includes three aspects: 1. Macro definition ; 2. File inclusion; 3. Conditional compilation . 
Preprocessing commands begin with the symbol "#".

Macro definition commands: #define, #undef , used to define and unset macros. (It is worth noting that you can also define macros with parameters) The

file includes the command: #include "filename" or #include <filename>. When using the former, the header file will be searched from the current directory first, and when the latter is used, the default system directory will be searched first.

Conditional compilation : #ifdef, #else, #endif, #elif, etc. For program compatibility reasons , some statements are expected to compile only when a condition is met. This is where conditional compilation commands are used.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324846089&siteId=291194637