Re: Still confuse with return

1998-09-05 Thread Glynn Clements
James wrote: - 2) Returning a type other than the declared value for the return type: - for exaple, the function: - - int foo() - { -float y; - -return y; - } - - would generate an error because it's retuurning type float where an int is expected. -

Global variables

1998-09-05 Thread Ravindra Jaju
Hi! Please tell me how to use global variables! I am using a program which in which I define a variable before the main function so that the functions after it can access and change it. But the changes I make to the global (??) variable aren't refrected in the main part of the program. I have

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

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