为C ++编程和开发配置VS代码

问题描述 投票:0回答:2
#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;
 }

这是我要运行的代码段。

c++ c visual-c++ c++14 configure
2个回答
0
投票

0
投票
© www.soinside.com 2019 - 2024. All rights reserved.