解决办法:
Ctrl + Shift + P 打开命令面板,
键入 "Select Intellisense Configuration"(下图是因为我在写文章之前已经用过这个命令,所以这个历史记录出现在了第一行)

再选择"Use gcc.exe "(后面的Found at D:\Program Files (x86)\mingw64\bin\ 是因为我的MinGW是安装在这个目录,添加到系统环境变量后,这里就侦测到了)
这样, 错误提示就没了。
注意output窗口有提示IntelliSense Mode改变生效:

其实,用"ctrl + ,"命令,打开设置,搜索"intelli",点击 "IntelliSense", 在右边出现的 Intelli Sense Mode中选择,应该也是一个道理。

这个操作应该对c_cpp_properties.json里的intelliSenseMode字段产生改变才对,但结果并不是:
只能手动改了。
问了下ChatGPT:

供参考。