let's assume I have a function that takes a pointer to pointer like this:
void foo (int** p){
// do stuff
}
my question is how can i pass a pointer to pointer to this function without making temporary pointer?
// sample code:
int a=10;
int* pa=&a; // temporary pointer
foo (&pa); // passes a pointer to pointer , but requires a temporary pointer
foo (&&a); // this does not compile
is there anyway to achieve this?
intcould be done with anint*.