[英]#include <Header.h> is not compiling while #include “Header.h” is compiling
不明白为什么#include <Header.h>
#include "Header.h"
与Visual Studio 2008一起编译时#include <Header.h>
没有编译。我缺少什么吗?
The two forms of #include
search for headers differently. #include
的两种形式对标头的搜索方式不同。
You can find which paths are searched for each form in the #include
MSDN documentation. 您可以在
#include
MSDN文档中找到针对每种形式搜索的路径。
They have different purposes. 他们有不同的目的。
The brackets <
and >
are for standard header files, while the quotes "
are for your header files. 方括号
<
和>
用于标准头文件,而引号"
用于头文件。
Here is another question with more information regarding this: 这是另一个有关此问题的更多信息的问题:
What is the difference between #include <filename> and #include "filename"? #include <文件名>和#include“文件名”有什么区别?
when you mention header file <>, it looks in standard includes, but when header file is included with "", starts with current directory,then will look at standard includes. 当您提到头文件<>时,它会查找标准包含,但是当头文件中包含“”时,它会从当前目录开始,然后会查看标准包含。 Here, in this case, Header.h is in current directory, may not be in standard includes.
在这种情况下,Header.h在当前目录中,可能不在标准包含中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.