c++ - __declspec() 中的 "storage-class information"是什么意思?

标签 c++ c visual-c++ declspec

我正在阅读 MSDN article关于 __declspec。

开头为:

The extended attribute syntax for specifying storage-class information uses the __declspec keyword, which specifies that an instance of a given type is to be stored with a Microsoft-specific storage-class attribute listed below. ...

存储级别信息到底是什么意思?它如何影响编译器?

添加1

有人发布了一个链接作为评论,但很快就删除了。我发现该链接很有用。所以我在这里添加它。

http://en.cppreference.com/w/cpp/language/storage_duration

最佳答案

本文似乎可以互换使用术语“扩展属性”和“存储类属性”。这些术语仅指您可以在 __declspec(...) 中指定的属性。 .

每个属性都有自己的含义,并且彼此之间大多无关。您可以点击文章中的链接来了解每个属性的用途。

关于c++ - __declspec() 中的 "storage-class information"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27308787/

相关文章:

c++ - 如何将 RGB 颜色代码分配给 WORD?

c++ - 在 Qt 中访问父对象

c++ - 为什么不能用 typedef 类型定义 Qt 信号的参数?

c++ - fstream 的问题读取正常但不写入用户输入字符串

c - 使用 FFMPEG 编码的 Wav 文件在使用 VLC 播放器播放时存在编解码器问题

c - 如何获取底层套接字读取缓冲区大小?

c - 包含 C 代码和汇编代码的 C 项目

c++ directshow filter 私有(private)接口(interface)

c++ - 程序在没有调试符号的情况下崩溃,使用它们运行良好(在任何一种情况下都没有优化或任何东西)

c++ - 项目无法与 libcurl 静态库链接