2

I finally set up the VSCode environment, just 1 remaining problem with #include as on the following image: 'iostream' file not found I checked many google results with similar, but not the same problem. The thing is that it compiles and runs correctly, even the intellisense suggests me the iostream file, but when I add it into the #include, error:

'iostream' file not found

appears.

What is wrong and how to fix it?

Gama11
  • 31,714
  • 9
  • 78
  • 100
Lukas Salich
  • 959
  • 2
  • 12
  • 30

2 Answers2

0

open your c_cpp_properties file in the project, add as follow configurations.i use of the clang.

"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"
]

pay attention to these path. they include necessary files when you complie,of course ,it is useful for me because of according to my files in the pc.you can custom to configure them. i hope my answer to help you out.if have any question,it is free to contect to me.

lvanboy
  • 1
  • 1
0

find the "setting".("file"——》"first choice"——》setting)(or click "ctrl"+",")..then search "clang.diagnostic.enable", then undo the "Enable diagnostic"