The meaning of _t in intptr_t [duplicate]
Generally, the suffix of _t
refers to typedef
, and _s
to a structure. There is no difference to the compiler, but for the benefit of users reading the code. This was once a common practice to apply such suffixes, but is now discouraged due to conflicts with POSIX & basic human confusion. Other similar discussions
- Standard for typedef'ing
- Naming scheme for typedefs
- What does a type followed by _t (underscore-t) represent?
- struct (C programming language)
Example:
// Discouragedstruct foo_s { int bar;};typdef struct foo_s foo_t;// Friendlytypedef struct foo_struct { int bar;} foo_type;