c++ - Visual Studio 中的 .hint 文件是什么?

标签 c++ visual-studio compiler-errors deprecated

在用 C++ 编写程序时,我遇到了一段代码:

#define _DEPRE_ [[deprecated("This is deprecated")]]

并在函数定义上方使用它来表明该函数已被弃用。但智能感知显示
通过将错误添加到另一个扩展名为 .hint 的文件来纠正错误。为什么会这样?

最佳答案

A hint file contains macros that would otherwise cause regions of code to be skipped by the C++ Browsing Database Parser. When you open a Visual Studio C++ project, the parser analyzes the code in each source file in the project and builds a database with information about every identifier. The IDE uses that information to support code browsing features.



有关更多详细信息,我建议您可以引用文档:Hint Files

关于c++ - Visual Studio 中的 .hint 文件是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61318783/

相关文章:

c++ - c++ 计算一个程序的运行时间(以秒为单位)

c++ - 在 CLion 中导入非 cmake GitHub 项目

c++ - 为什么 Microsoft 的 C 编译器要函数开头的变量?

c++ - 预构建中自动生成的 C++ 文件未包含在编译中

c - '%s'期望参数类型为 'char *',但参数类型为 'int'

java - maven "cannot find symbol"消息无用

c++ - 检测类型是否为 "mapping"

sql - 从 Code First 创建的数据库显示在服务器资源管理器中,而不是 SQL Server 对象资源管理器中

c# - 当它们显示在 'Output' 窗口时,我能看到哪一行抛出异常吗?

linux - OpenCV 构建错误 : libwebp. 所以未找到