您的位置:首页 > 编程语言 > C语言/C++

Visual Studio Code 写 C++ 代码如何禁用编辑错误提示

2018-02-28 18:03 836 查看

一、引言

最近在学习 C++ Primer 第五版的时候,想要使用 Visual Studio Code 来随书敲一些代码片段。

但是很“可恶”的是,默认的 Visual Studio Code 会显示编辑错误提示,比如下图所示:



对于我这样的强迫症来说,不能忍!不能忍!坚决不能忍 : (

那么,怎么去掉编辑区域中默认的编辑错误提示呢?

二、问题解决

1. 我们打开
文件
菜单,点击
首选项
,点击
设置
,进入 settings.json 文件中。



2. 在这里面,我们找到
C/C++ Configuration
配置项,找到
C_Cpp.errorSquiggles
配置项

// Controls whether suspected compile errors detected by the IntelliSense engine will be reported back to the editor. Warnings about #includes that could not be located will always be reported to the editor. This setting is ignored by the Tag Parser engine.
"C_Cpp.errorSquiggles": "Enabled",


3. 我们复制这行代码,然后粘贴到右侧的
用户设置
中去,修改
Enabled
Disabled
,修改效果如果所示:



最后的结果当然是令人满意的:



Enjoy it : )
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息