I\'m reading \'The C Programming Language\' and encountered a problem about typedef of struct. The code is like this:
typedef struct tnode *
When you declare TreePtr, you are not implementing the struct. That is known as a "forward declaration". Something like: "here we use this, but later I will explain it better". The implementation must appear later, only once, and that is what you find in the second typedef.
And TreePtr is not the same as the struct, because TreePtr will be in fact a new type that includes the fact of beeing a pointer.