Secondly, Mehrdadβs explanation is a point.
It is not uncommon that in C code, you define a variable with the same name as the name of the structure, for example, "node node;". Perhaps this is not a good style; It is common in, for example, the linux kernel, code.
The real problem in the source code is that the compiler does not know how to interpret the "tree" in "(tree *) malloc". According to a compilation error, it is explicitly interpreted as a variable.
source share