Re: Global variables

1998-09-08 Thread James
On Sat, 5 Sep 1998, Marin D wrote: -As u havent included any example I would suppose the situation is as -follows: [SNIP!] - -Am I right? If so just change do_change to - -void do_change(int* x, int y) - -do_change(&global,100); N, wrong. BZZZT. It's a GLOBAL variable... just re-assign dat

Re: Global variables

1998-09-07 Thread David Ross
On Sun, 6 Sep 1998 Andrew P. Bell wrote: > You're bang on there Glynn. I don't know whether to take it as a joke or > a cry for help. Either way, it's a pretty sorry question that warrants > a hazing (sp?) of some kind. Oh well, it keeps people like yourself on > your toes -- we can't alw

Re: Global variables

1998-09-07 Thread James
On Sat, 5 Sep 1998, Ravindra Jaju wrote: -Hi! -Please tell me how to use global variables! Ok, consider the following code... it counts up to 10, printing the contents of a global variable... /* Cut here */ #include /* Global Variables Here */ int foo = 666; /* Makes an integer variable calle

Re: Global variables

1998-09-06 Thread Andrew P. Bell
You're bang on there Glynn. I don't know whether to take it as a joke or a cry for help. Either way, it's a pretty sorry question that warrants a hazing (sp?) of some kind. Oh well, it keeps people like yourself on your toes -- we can't always give you difficult queries you know. Regards, A

Re: Global variables

1998-09-05 Thread Marin D
As u havent included any example I would suppose the situation is as follows: /// int global; void do_change(int x, int y) { x = y; return; } int main() { ... do_change(global,100); ... /* oops global is still unchanged = 0 */ } / Am I right

Re: Global variables

1998-09-05 Thread Glynn Clements
Ravindra Jaju wrote: > Please tell me how to use global variables! At one time, I would have taken it for granted that a question such as this had to be a joke. Nowadays I just wonder how long it's going to be before people start posting to mailing lists with questions like `How do I turn my co