安装c/c++插件后,按ctrl+shift+p,
点击打开了c_cpp_properties.json文件,对其中的IncludePath进行编辑,示例如下:
"includePath": ["${workspaceFolder}/**","${workspaceFolder}/include/**","${workspaceFolder}/src/calc/include/dbus/**","${workspaceFolder}/src/calc/include/util/**","${workspaceFolder}/src/calc/include/main/**","C:/mingw32/i686-w64-mingw32/include/c++","C:/mingw32/i686-w64-mingw32/include/c++/i686-w64-mingw32","C:/mingw32/i686-w64-mingw32/include/c++/backward","C:/mingw32/i686-w64-mingw32/include","C:/mingw32/include","C:/mingw32/lib/gcc/i686-w64-mingw32/5.4.0/include","C:/mingw32/lib/gcc/i686-w64-mingw32/5.4.0/include-fixed"],
注意,如果a.h中还include了b.h,即使a.h在包含范围内,但b.h没在包含范围内的话,a.h上也仍然会显示波浪线。