Hi,
I have a tree structure defined as.
I am aware that in C you have to allocate memory for the structure, or you get a segmentation error.Code:typedefchar value [50]; typedef struct tree*node; struct tree { node l, r; value setvalue; };
Should I allocate memory to each part of the structure or should I allocate memory to the whole structure?
how do I allocate memory in this case? (example code would be nice)