A
Andrej Prsa
Hi!
What happens to a globally defined pointer, e.g.
void *value;
that points to a particular type in a function:
int dummy_func (int a)
{
value = &a;
return 0;
}
after the function returns to main? If this doesn't work, how could I make
it work? Do I have to allocate memory for this int and copy the original
int to that and then point value to this newly allocated int?
Thanks for your time,
Andrej
What happens to a globally defined pointer, e.g.
void *value;
that points to a particular type in a function:
int dummy_func (int a)
{
value = &a;
return 0;
}
after the function returns to main? If this doesn't work, how could I make
it work? Do I have to allocate memory for this int and copy the original
int to that and then point value to this newly allocated int?
Thanks for your time,
Andrej