samedi 21 février 2015

Access function variable values without arguments

I am with a problem which consists in print some value of a function(FOO) with another function(RECOVER), but recover is a void function without arguments. How could I access the foo variables ?


Example:



int foo(int a, short b, char c){
int x, y, z;
x = a;
y = b;
z = c;
recover();
}

void recover()
{
How can I print the x y z values here ?
}


PS: I can create another function that would help me to do it. Could I access these values using the register values ? Or pointers ?


Thank you guys


Aucun commentaire:

Enregistrer un commentaire