配置VS代码以进行C ++编程和开发

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\LENOVO\Desktop\projects\helloworld\helloworld.cpp).C/C++(1696)
   cannot open source file "iostream"C/C++(1696)

上面显示的是每当我尝试包含或任何其他文件时。我已经安装了MinGw,并且已经设置了路径环境变量。我还在Vs代码中安装了c / c ++ Microsoft扩展。我还是不明白这里发生了什么。有人可以帮忙吗

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};

for (const string& word : msg)
{
    cout << word << " ";
}
cout << endl;
 }

这是我要运行的代码段。

评论