[Solved] #include errors detected. Please update your includePath.

When I saw the solution, I didn’t know why my first reaction was: Sima Danghuo, doctor.

Under the. Vscode folder, locate C_ cpp_ Properties.json, I don’t need to tell you that people have told you about their mistakes.

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "/usr/include/**",		add this line
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "linux-gcc-x64",
            "compileCommands": "${workspaceFolder}/build/release-cpp11/compile_commands.json"
        }
    ],
    "version": 4
}

Read More: