typedef struct leaf{
int value;
struct leaf* lchild;
struct leaf* rchild;
} LEAF;
For example the one above defines structure leaf and makes 2 members of that type: lchild, rchild. So is this like a recursion?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your assumption is wrong.
leafhas 2 members of typeleaf*, notleaf. So it’s not (data) recursion.And the following
would be illegal in C++. Note that in C++ you don’t need
struct leafwhen you declare a member of variable of that type, nor do you need thetypedef.