You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code中#include <iostream>报错问题求助

VS Code中#include 报错问题求助

各位大佬好,我遇到个棘手的问题:之前在VS Code里写C++代码一直都正常,但最近尝试引入<iostream>头文件时却报错了。

我已经试着把MinGW的相关路径添加到了c_cpp_properties.json文件里,具体配置如下:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "C:\\MinGW",
                "C:\\MinGW\\include",
                "C:\\MinGW\\bin",
                "C:\\MinGW\\lib"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:/MinGW/bin/gcc.exe",
            "cStandard": "c11",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "windows-gcc-x86"
        }
    ],
    "version": 4
}

可就算这样配置了,报错还是没消失。我是不是哪里的路径加错了?或者还有其他什么解决办法吗?麻烦各位帮忙指点一下,谢谢啦!

备注:内容来源于stack exchange,提问作者Janexx

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 07:13:01