Confused by #define and typedef

后端 未结 4 2137
鱼传尺愫
鱼传尺愫 2021-01-07 01:27
#define T Stack_T
typedef struct T *T;

Then what does T in struct T mean,the one defined by #define or

4条回答
  •  天命终不由人
    2021-01-07 01:42

    Since #define is processed in pre-compilation and struct in compilation, after the pre-compilation you'll have typedef struct T *T; looks like that: typedef struct Stack_T *Stack_T;

提交回复
热议问题