1. The header files in C 1.1 The header file in the standard library is placed in the namespace STD (the content in the namespace is not visible), but it brings a new problem. Countless existing C code relies on the functions in the multi-year counterpart library, such as the functionality in the , using the STD wrapper standard library, causing unavailable existing code, for compatibility In this case, the Standard Board created a new header file for the part of the STD, the file name of the new header file is the same as the old, but there is no .H this suffix, such as . For the C header file, the same method is used, but the character c is also added before each header file name, such as becomes , to become . It is best to use the new file header, using the C program of the new file header, you need to use the USING NAMESPACE STD or the USING NAMESPACE std :: specified class name, and other methods to make the required class to our code. 1.2 Custom Header Document To prevent head files from being repeatedly referenced, it is best to use preprocessing definition, as shown below: #ifndef myhead_h # define myhead_h ... // Summer file # ENDIF1.3 Preprocessing Related knowledge (1 #Ifdef: Judging whether a pre-processed constant is defined, such as #infef degug (2) #ifndef: Determine if a prerequisite constant is not defined (3) #define: Define a pretreatment constant, such as #define debug (4 #Include (5) #ENDIF (6) The definition of the pre-processed constant can also be performed at compile, such as CC-DEBUG Main.c (7) When compiling C programs, the compiler automatically defines a pre-processor name. __cplusplus (Note There are two underlined lines in front), so it can determine if the program is a C program, so that there is a condition, such as: #ifndef myhead_h # define myhead_h # ifdef __cplusplusextern "c" {#ndifint DMPostProcessing (); # neyf__cplusplus} # ENDIF # ENDIF (8) When compiling the C program, the compiler will automatically define the pre-processing constant __stdc__. Of course __cplusplus and __stdc__ will not be defined simultaneously; (9) The other two more useful predefined constants are __line __ (record files have been compiled) and __file __ (the name being compiled).