Well consider i have a structure as follows
Code:
struct list{
struct list *next[5];
};
now while adding new elements...
previous->next[i]=new struct list;
this will create a list and so on.. beofre the above statement previous->next[i] was equal to NULL... now consider I have a function as follows
Code:
void function(struct *list)
{
//this function will further build a tree below list
list=new struct list //and so on
list->next[i]=new struct list; //etc etc etc
}
now calling where previous->next[i] is NULL
function(previous->next[i]);
when the above is done the previous node holds no information of the tree below unless I pass the function with a pointer already pointing to a structure... why is this.... I know i have not explained things clearly but feel free to ask questions ........