后缀“_t”代表什么?在C中代表什么?
可能的重复:
类型后跟 _t (下划线-t)是什么意思代表?
在我的 IDE (Xcode) 中输入时,当我输入某些变量名称时,自动完成功能会弹出已定义的单词。我偶尔会看到名称末尾带有“_t
”。
这是什么命名约定以及它的含义是什么?
是否有参考文档来查找常用的前后修复?
使用术语“postfix”进行搜索会给我带来很多关于同名邮件服务器的 GoogleNoise。
Possible Duplicate:
What does a type followed by _t (underscore-t) represent?
While typing in my IDE (Xcode), autocomplete pops up already-defined words when I'm partway thru entering some variable name. I occasionally see names that have '_t
' at the end of them.
What naming convention is that and what does it mean?
Is there a reference document to look up pre- and post-fixes in common use?
Searching with the term "postfix" gives me a lot of GoogleNoise about the mail server of the same name.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
t 代表“type”或“typedef”。您将看到许多带有
time_t
、size_t
等的 POSIX 标头(和其他标头)。它们根据操作系统和机器架构保存(不一定定义)特定的位大小。The t stands for "type" or "typedef." You'll see a lot of POSIX headers (and others) with
time_t
,size_t
, and others. These which hold (not necessarily defined) specific bit-sizes based on the operating system and machine architecture.仅根据我自己的经验,“_t”后缀表示“数据类型”。换句话说,它是使用 typedef 定义的数据类型。
based only on my own experience, the "_t" postfix means "data type". In other words, it's a datatype defined used typedef.
“_t”后缀是数据类型名称的约定,例如
size_t
或wchar_t
。它的使用并不一致。The "_t" suffix is a convention for data type names such as
size_t
orwchar_t
. It's not used consistently.