I have a general doubt regarding passing pointers to functions...
Suppose i have variable
tc_struct *ptr;
and i want to pass it to a function to fill it. So i passed it
func(&ptr);
and i received it in func as
void func(tc_struct** ptr1)
Now again i want to pass this same pointer to another function from inside 'func' to fill some part of the structure. So should i pass it as
func2(&ptr1)
and receive as
void func2(tc_struct*** ptr2)
or is it ok if i pass it as
func2(ptr1)
and receive as
void func2(tc_struct** ptr2)
In which method i can get allt he modifications inside func2 reflected inside my actual pointer ptr?
note :these functions could go in a nested way to say funcN()..
-----
I want to know if there is any generic idea i can apply on pointer to functions.
Thanks in advance