是什么的#include℃之间的差异;文件名&GT;和&#包括QUOT;文件名&QUOT;? [英] What is the difference between #include <filename> and #include "filename"?
问题描述
在C和C ++编程语言,是用尖括号,并在包含
语句中使用引号之间的区别,如下所示?
-
的#include&LT;&名GT;
-
的#include文件名
所不同的是在位置,所包含的文件preprocessor搜索。
有关的#include文件名
的preprocessor在同一目录作为包含指令的文件搜索。这种方法通常用于包括程序员定义的头文件。
有关的#include&LT;文件名&GT;
在执行依赖性preprocessor搜索,通常在搜索目录$ P $编译器/ IDE对指定。这种方法通常用于包括标准库的头文件。
In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include
statement, as follows?
#include <filename>
#include "filename"
The difference is in the location where the preprocessor searches for the included file.
For #include "filename"
the preprocessor searches in the same directory as the file containing the directive. This method is normally used to include programmer-defined header files.
For #include <filename>
the preprocessor searches in an implementation dependent manner, normally in search directories pre-designated by the compiler/IDE. This method is normally used to include standard library header files.
这篇关于是什么的#include℃之间的差异;文件名&GT;和&#包括QUOT;文件名&QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!