* Pat:
> Is is possible to have variables that are defined in a function
> accessible in another function?
>
> I'm working on a program that makes calls to several (user defined)
> functions. I would like to access some of the variables defined in the
> first function for use in the second one, but I'm not sure how to do
> that. Everything I've read indicates the variables must be defined
> outside the function to be more globally accessible. But that would not
> be very convenient. So I hope there's a work around.
It seems that what you want to pass around is information, not variables.
Please post a minimal, compilable example that illustrates the problem.
Please also do tell which language you're using: C, or C++.
Cheers, & hth.,
- Alf
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


|