Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/130.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ VSCode";“文件名”;找不到文件_C++_Visual Studio Code_Include_File Not Found - Fatal编程技术网

C++ VSCode";“文件名”;找不到文件

C++ VSCode";“文件名”;找不到文件,c++,visual-studio-code,include,file-not-found,C++,Visual Studio Code,Include,File Not Found,我终于设置了VSCode环境,只剩下#include的一个问题,如下图所示: 我检查了许多谷歌搜索结果,发现了类似的问题,但不是同一个问题。问题是它编译和运行正确,甚至intellisense也建议我使用iostream文件,但当我将其添加到#include中时,错误: 找不到“iostream”文件 出现了 有什么问题以及如何修复?在项目中打开c_cpp_属性文件,添加以下配置。我使用了叮当声 "c-cpp-flylint.clang.includePaths": [ "${works

我终于设置了VSCode环境,只剩下
#include
的一个问题,如下图所示: 我检查了许多谷歌搜索结果,发现了类似的问题,但不是同一个问题。问题是它编译和运行正确,甚至intellisense也建议我使用
iostream
文件,但当我将其添加到
#include
中时,错误:

找不到“iostream”文件

出现了


有什么问题以及如何修复?

在项目中打开c_cpp_属性文件,添加以下配置。我使用了叮当声

"c-cpp-flylint.clang.includePaths": [
    "${workspaceRoot}",
    ".",
    "C:/llvm/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++",
    "C:/llvm/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/x86_64-w64-mingw32",
    "C:/llvm/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/backward",
    "C:/llvm/lib/gcc/x86_64-w64-mingw32/7.1.0/include",
    "C:/llvm/include",
    "C:/llvm/x86_64-w64-mingw32/include",
    "C:/llvm/lib/gcc/x86_64-w64-mingw32/7.1.0/include-fixed",
    "C:/LLVM/lib/gcc/x86_64-w64-mingw32/7.1.0/include/ssp"
]
注意这些路径。他们包括必要的文件,当你complie,当然,这是有用的,因为根据我的文件在电脑上。你可以自定义配置它们。我希望我的回答能帮助您。如果有任何问题,请随时与我联系。

找到“设置”(“文件”->“首选”->“设置”)(或单击“ctrl”+“,”)。然后搜索“clang.diagnostic.enable”,然后撤消“启用诊断”