This seems like a simple question, but I can\'t find it with the Stack Overflow search or Google. What does a type followed by a _t
mean? Such as
The _t
does not inherently have any special meaning. But it has fallen into common use to add the _t
suffix to typedef's.
You may be more familiar with common C practices for variable naming... This is similar to how it's common to stick a p at the front for a pointer, and to use an underscore in front of global variables (this is a bit less common), and to use the variable names i
, j
, and k
for temporary loop variables.
In code where word-size and ordering is important, it's very common to use custom defined types that are explicit, such as BYTE
WORD
(normally 16-bit) DWORD
(32-bits).
int_t
is not so good, because the definition of int
varies between platforms -- so whose int
are you conforming to? (Although, these days, most PC-centric development treats it as 32 bits, much stuff for non-PC development still treat int's as 16 bits).