In C, I want to pass a pointer to another function so I coded the following,
node* list // contains linked list of nodes
void function (node* list){
/*Whatever I do here, I want to make sure that I modify the original list,
not the local copy. +
how do I pass the original pointer 'list' to this function so that I'm working
on the same variable? */
}
[EDIT]
I just like to clarify few things here,
I actually have a void function which takes a struct argument,
void function (struct value arg){ }
and in the struct, I'm defining one of my internal variables as,
node* list-> list;
so in my function, if I do something like,
arg->list
am I accessing the original list variable?