M
maths_fan
I'd like to make a tree without any functions. I mean just using the
structure.
I have a structure:
struct TTree
{
int key;
struct TTree* pLeft;
struct TTree* pRight;
} Tree[] =
{
??????????
}
In the place with quastions I should write something for making a
tree. (Any tree). I just need to know how is it possible. I wrote
something like
struct TTree
{
int key;
struct TTree* pLeft;
struct TTree* pRight;
} Tree[] =
{
5, Tree[3], Tree[6],
4, NULL, NULL,
6, NULL, NULL
}
It didn't work.
structure.
I have a structure:
struct TTree
{
int key;
struct TTree* pLeft;
struct TTree* pRight;
} Tree[] =
{
??????????
}
In the place with quastions I should write something for making a
tree. (Any tree). I just need to know how is it possible. I wrote
something like
struct TTree
{
int key;
struct TTree* pLeft;
struct TTree* pRight;
} Tree[] =
{
5, Tree[3], Tree[6],
4, NULL, NULL,
6, NULL, NULL
}
It didn't work.