gpt4 book ai didi

c++ - Visual Studio 2013 header 包含失败

转载 作者:行者123 更新时间:2023-11-30 16:43:35 25 4
gpt4 key购买 nike

有谁知道,为什么我无法包含我的头文件,尽管它们位于同一文件夹中?我只是使用#include < inout.h >在这个例子中。环境是Microsoft Visual Studio 2013 Ultimate。也对德国人感到抱歉,但我认为它仍然可以理解。谢谢您的帮助。 failing header include

最佳答案

您的主要问题是 #include <inout.h>将开始在系统 header 中搜索,而 #include "inout.h"在继续检查系统路径之前将首先检查您的本地目录。

A preprocessing directive of the form

#include <h-char-sequence>

searches a sequence of implementation-defined places for a header identified uniquely by the specified sequence between the < and > delimiters, and causes the replacement of that directive by the entire contents of the header. How the places are specified or the header identified is implementation-defined.

A preprocessing directive of the form

#include "q-char-sequence"

causes the replacement of that directive by the entire contents of the source file identified by the specified sequence between the " delimiters. The named source file is searched for in an implementation-defined manner. If this search is not supported, or if the search fails, the directive is reprocessed as if it read

#include <h-char-sequence>

with the identical contained sequence (including > characters, if any) from the original directive.

应该说,虽然这是依赖于编译器的,所以情况可能并不总是如此,但这就是您的错误的原因。

关于c++ - Visual Studio 2013 header 包含失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45145816/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com