E
eoindeb
Sorry to ask another global variable question, but from reading other
posts I'm still not sure whether to use them or not.
I have a program with a set function that calls 4 other functions in
order - let's say function A, B, C, D.
It always calls function A first which is a function that returns a
system path. Now all other functions require that variable as well
(function A returns a char pointer)
So my question is - should I declare a global variable, set it's value
using function A and then use that variable in the other functions as
well.
Or is there a preferred method to achieve what I need? Hope I have made
myself clear!!
Thanks.
posts I'm still not sure whether to use them or not.
I have a program with a set function that calls 4 other functions in
order - let's say function A, B, C, D.
It always calls function A first which is a function that returns a
system path. Now all other functions require that variable as well
(function A returns a char pointer)
So my question is - should I declare a global variable, set it's value
using function A and then use that variable in the other functions as
well.
Or is there a preferred method to achieve what I need? Hope I have made
myself clear!!
Thanks.