修改c_cpp_properties.json
command + shift + p 搜索 >c/c++:Edit Configurations,则会在.vscode目录下生成c_cpp_properties.json配置文件,修改includePath添加头文件路径。

修改setting.json
如果vscode有安装C/C++ Clang Command Adapter插件,则需要为clang添加头文件。

参考:https://www.cnblogs.com/heyingquan0210/p/12288578.html