#define T Stack_T
typedef struct T *T;
Then what does T in struct T mean,the one defined by #define or
The preprocessor does only do text-substitutions, so that code would look like
typedef struct Stack_T *Stack_T;
So every T in your code is first replaced to Stack_T, and after that your compiler kicks in, sees the typedef and uses struct Stack_T*.
It might be good to know that struct Type and Type are only the same in C++, not in C.