In practice, the difference is in the location where the preprocessor searches for the included file.
(实际上,区别在于预处理器搜索包含文件的位置。)
For #include <filename>
the preprocessor searches in an implementation dependent manner, normally in search directories pre-designated by the compiler/IDE.
(对于#include <filename>
,预处理器通常以实现依赖方式进行搜索,通常在编译器/ IDE预先指定的搜索目录中进行搜索。)
This method is normally used to include standard library header files. (此方法通常用于包括标准库头文件。)
For #include "filename"
the preprocessor searches first in the same directory as the file containing the directive, and then follows the search path used for the #include <filename>
form.
(对于#include "filename"
,预处理器首先在与包含指令的文件相同的目录中搜索,然后遵循用于#include <filename>
格式的搜索路径。)
This method is normally used to include programmer-defined header files. (此方法通常用于包括程序员定义的头文件。)
A more complete description is available in the GCC documentation on search paths .
(有关搜索路径的GCC 文档中提供了更完整的描述。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…