前言
(1)我们在使用Vscode进行开发的时候,命名文件成功编译通过了,但是Vscode还是有波浪线的提示。
(2)其实成功编译通过就行,但是肯定还会存在一些强迫症患者,硬要消除这个报错。接下来我将介绍如何消除这个问题。方法很简单

正文
(1)按下按键ctrl+shift+p。即可进入控制台,然后输入C++,找到编辑配置选项。

(2)往下拉,找到高级设置,点击进行扩展。

(3)往下滑,找到编译命令这个选项

(4)将 build 路径中的 compile_commands.json 完整路径复制到这个编译命令中

(5)完活!