C语言 ptrdiff_t 在 C 中定义在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3597743/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is ptrdiff_t defined in C?
提问by Matt Joiner
Where is ptrdiff_tdefined in C?
ptrdiff_t在 C 中定义在哪里?
回答by GManNickG
It's defined in stddef.h.
它在stddef.h.
That header defines the integral types size_t, ptrdiff_t, and wchar_t, the functional macro offsetof, and the constant macro NULL.
该标题定义了整数类型size_t,ptrdiff_t以及wchar_t,功能宏offsetof,和恒定的宏NULL。
回答by Matt Joiner
It is defined by the POSIX standard: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.htmlWhere the type is exactly may be implemetation-specific, but interface is stddef.h
它是由 POSIX 标准定义的:http: //pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html确切地说,类型可能是特定于实现的,但接口是 stddef.h

