Hello, I have a problem I am trying to figure out. I have a variable a in main. I am passing the address of this variable to my function foo.
in my function foo, I would like to do the same thing to this variable within my function foo, passing it to my function foo2.Code:int main() { int a = 0; foo(&a); } void foo(int * a);
would that be a proper call, parameter list and use of the variable in my function? thank you.Code:void foo(int * a) { foo2(&(*a)); } void foo2(int * a) { int x = *a; }