我只想尝试使用Visual Studio代码进行C ++编码。我已经在笔记本电脑(Win10-64)上安装了vscode 1.18.1。
通过输入以下代码,我得到了错误:
#include <iostream>
using namespace std;
int main()
{
std::cout << "Hello world!" <<endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
应该不会发生任何错误。C:\ Users \ Harri \ OneDrive \ Tiedostot \ Demo2.vscode \ c_cpp_properties.json-内容:
“路径”:[“ / usr / include”,“ / usr / local / include”,“ $ {workspaceRoot}”],
第1行的问题/错误:
“已检测到#include错误。请更新您的includePath。此变量转换单元(C:\ Users \ Harri \ OneDrive \ Tiedostot \ Demo2 \ Calc.cpp)的IntelliSense功能将由Tag Parser提供。”
“无法打开源文件” iostream“”