# The include facility is part of the C ++ pre-processor. The source code of the pre-processor processing program is carried out before the compiler. The preprocessor replaces each # include with the specified header file content.
Regardless of the format in which the header file is saved, it generally contains the class definitions and declarations of variables and functions required for separate compilation.
We must ensure that multiple times containing the same header file will not cause the class and object defined by this header file to be defined multiple times.
The preprocessor variable name must be unique in the program. Any use of names that match the preprocessor variable is associated with the preprocessor variable.
To avoid name conflicts, preprocessor variables are often expressed in uppercase letters.
Preprocessor variables have two states: defined or undefined. The pre-processor variables defined are different from the pre-processor indicators used to detect their statuses.
# Define indicates accepting a name and defining it as a preprocessor variable
# Ifndef indicates whether the specified preprocessor variable is defined. If the preprocessor variable is undefined, all the instructions following it will be processed, knowing that # endif appears.
Pre-processor