按Ctrl+shift+p键,输入
>c++edit configurations JSON
,回车,在includePath
中写入你的头文件路径
例如:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"/usr/include" // Your header directory
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "D:\\ProgramFiles\\mingw64\\bin\\gcc.exe",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "windows-gcc-x64"
}
],
"version": 4
}