How could I send a pointer to a function with reference? I mean, I would like to change where the pointer is poiting in that function.
I have seen for this the double pointer, like for example:
Abc* p;
function(&p);
function(Abc** p){
(*p) = 0;
}
But, I have been told that this is not the best way to approach it. How could be better? Would this work? :
Abc* p;
function(p);
function(Abc* p){
p = 0;
}
Thanks