
c++头文件包含头文件
[rps-include post=6557]
[rps-include post = 6557]
C header files used to load builtin or third party libraries. Header files provides information about the library, functions, variables, structures etc. provided library.
C头文件,用于加载内置库或第三方库。 头文件提供有关库,函数,变量,结构等所提供库的信息。
包括 (Include)
In order to load library header files we use #include
preprocessor. #include
preprocessor will load related library definitions before source code is expanded and compiled. All related definitions are inserted into the source code automatically. Include syntax is very simple like below. We write #include
and the library name.
为了加载库头文件,我们使用#include
预处理器。 #include
预处理程序将在扩展和编译源代码之前加载相关的库定义。 所有相关的定义都会自动插入到源代码中。 包含语法非常简单,如下所示。 我们编写#include
和库名。
#include HEADERFILE
In the following example we will load mathematical library by providing the header file name which is math.h
在下面的示例中,我们将通过提供头文件名称math.h
来加载数学库。
#include <math.h>
加载用户库 (Load User Libraries)
As previously stated C applications may use builtin or third party libraries. There is a little different while loading differently provided libraries. Following example will look default paths to load library.
如前所述,C应用程序可以使用内置库或第三方库。 加载不同提供的库时有所不同。 以下示例将查找加载库的默认路径。
#include <math.h>
But following line will look current project path and then default paths to load library. This is used to load user defined libraries.
但是下面的行将显示当前项目路径,然后是加载库的默认路径。 这用于加载用户定义的库。
#include "math.h"
[rps-include post=6557]
[rps-include post = 6557]
c++头文件包含头文件