What does a type followed by _t (underscore-t) represent?

后端 未结 10 575
萌比男神i
萌比男神i 2020-11-22 07:15

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



        
10条回答
  •  抹茶落季
    2020-11-22 07:50

    For example in C99, /usr/include/stdint.h:

    typedef unsigned char           uint8_t;
    typedef unsigned short int      uint16_t;
    #ifndef __uint32_t_defined
    typedef unsigned int            uint32_t;
    # define __uint32_t_defined
    #endif
    #if __WORDSIZE == 64
    typedef unsigned long int       uint64_t;
    #else
    __extension__
    typedef unsigned long long int  uint64_t;
    #endif
    

    _t always means defined by typedef.

提交回复
热议问题