In the past, struct was always used in C ++, so the following statements are compiled without errors:
Struct node {double A; node * left; node * right;}... node * initnode (node * root, node * newnode ){.....}
But for the pure C compiler, the above sectionCodeThe problem arises. The C compiler does not consider node as a type by default. Therefore, you need to handle the above Code as follows:
Struct node {double A; struct node * left; struct node * Right ;}...... struct node * initnode (struct node * root, struct node * newnode ){.....}
Each node must use the keyword struct to indicate that it is a type that is troublesome, but must be so. You can also use the typedef keyword to simplify the operation:
Struct node {double A; struct node * left; struct node * right;} typedef struct node tnode ;...... tnode * initnode (tnode * root, tnode * newnode ){.....}