Home > Back-end >  Consult typedef struct PtrToNode and typedef PtrToNode difference
Consult typedef struct PtrToNode and typedef PtrToNode difference

Time:10-11



The two posts of writing is not the same, the same two meanings?
PtrToNode is a kind of type, why typedef and PtrToNode to add struct?

CodePudding user response:

Feel good strange, with so many tyoedef, feeling he can make it complicated,,,,,,,

My habit is such a definition:
 typedef struct BiTNode {
char data;
Struct lchild BiTNode * and * rchild;
} BiTNode, * BiTree;//storage structure of binary tree node

CodePudding user response:

reference 1st floor wowpH response:
feel good strange, with so many tyoedef, feeling he can make it complicated,,,,,,,

My habit is such a definition:
 typedef struct BiTNode {
char data;
Struct lchild BiTNode * and * rchild;
} BiTNode, * BiTree;//storage structure of binary tree node
??

CodePudding user response:

reference 1st floor wowpH response:
feel good strange, with so many tyoedef, feeling he can make it complicated,,,,,,,

My habit is such a definition:
 typedef struct BiTNode {
char data;
Struct lchild BiTNode * and * rchild;
} BiTNode, * BiTree;//storage structure of binary tree node
understand liao

CodePudding user response:

GCC compiler but

CodePudding user response:

Typede struct PtrToNode * PtrToNode PtrToNode is to define a data type and the type of the pointer to the variable naming for PtrToNode
Keywords struct is used to define new data types of
To define a data type and keywords typedef alias, there is no definition of new data types!!!!!!!!!!!!!!! (before I learn C also often don't know!!! The building must be carefully look at my answer duck)
  • Related