我重新安装了 Visual Studio 2022,由于某种原因,当我输入
#include "
时,IntelliSense 显示所有可用的头文件:
我不记得做了什么特殊的事情来只显示添加到项目中的标题,这是 Visual Studio 在键入
#include "
而不是 #include <
时所做的。
是否可以选择恢复旧的行为?
从附加包含目录来看,我猜Visual Studio会按顺序搜索包含目录或附加包含目录下的头文件。
1.In the current source directory.
2.In the Additional Include Directories in the project properties (Project -> [project name] Properties, under C/C++ | General).
3.In the Include directories is available at Project Properties (Project -> [project name] Properties,Configuration → VC++ Directories
如果您想自定义搜索包含文件的目录,请尝试删除这些头文件的路径并在您的头文件文件夹中添加头文件。